Class: Sourcery::Context
- Inherits:
-
Object
- Object
- Sourcery::Context
- Defined in:
- lib/sourcery/context.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#__binding__ ⇒ Object
Get a clean binding.
-
#initialize(dir = nil) ⇒ Context
constructor
A new instance of Context.
- #method_missing(s) ⇒ Object
- #root ⇒ Object
- #to_h ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(s) ⇒ Object
17 18 19 |
# File 'lib/sourcery/context.rb', line 17 def method_missing(s) @metadata.send(s) end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/sourcery/context.rb', line 9 def @metadata end |
Instance Method Details
#__binding__ ⇒ Object
Get a clean binding.
38 39 40 |
# File 'lib/sourcery/context.rb', line 38 def __binding__ binding end |
#root ⇒ Object
22 23 24 |
# File 'lib/sourcery/context.rb', line 22 def root .root end |
#to_h ⇒ Object
27 28 29 |
# File 'lib/sourcery/context.rb', line 27 def to_h @metadata.to_h end |