Class: Factrey::DSL::Let
- Inherits:
- BasicObject
- Defined in:
- lib/factrey/dsl/let.rb
Overview
An intermediate object for let(:name).node(...) notation. See #let.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(dsl, name) ⇒ Let
constructor
A new instance of Let.
- #method_missing(method_name) ⇒ Object
Constructor Details
#initialize(dsl, name) ⇒ Let
Returns a new instance of Let.
11 12 13 14 |
# File 'lib/factrey/dsl/let.rb', line 11 def initialize(dsl, name) @dsl = dsl @name = name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
19 |
# File 'lib/factrey/dsl/let.rb', line 19 def method_missing(method_name, ...) = @dsl.let(@name) { @dsl.__send__(method_name, ...) } |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/factrey/dsl/let.rb', line 7 def name @name end |