Class: Foobara::TypeDeclarations::Dsl::AttributeCreated
- Inherits:
- BasicObject
- Defined in:
- foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb
Overview
Using this class as a proxy to explode if somebody accidentally tries to use the return value of an attribute declaration NOTE: when debugging stuff, it’s helpful to comment out the inheritance from BasicObject
Instance Method Summary collapse
-
#initialize(name) ⇒ AttributeCreated
constructor
A new instance of AttributeCreated.
- #method_missing(method_name) ⇒ Object
- #respond_to_missing? ⇒ Boolean
Constructor Details
#initialize(name) ⇒ AttributeCreated
Returns a new instance of AttributeCreated.
23 24 25 |
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 23 def initialize(name) @_name = name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
27 28 29 |
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 27 def method_missing(method_name, ...) ::Kernel.raise BadAttributeError.new(@_name, method_name) end |
Instance Method Details
#respond_to_missing? ⇒ Boolean
31 32 33 34 35 |
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 31 def respond_to_missing?(...) # :nocov: false # :nocov: end |