Class: Onsi::Includes
- Inherits:
-
Object
- Object
- Onsi::Includes
- Defined in:
- lib/onsi/includes.rb
Overview
Used to include other objects in a root Resource objects.
Instance Attribute Summary collapse
-
#included ⇒ Array<Symbol>
readonly
The includes.
Instance Method Summary collapse
-
#initialize(included) ⇒ Onsi::Includes
constructor
Create a new Includes object.
Constructor Details
#initialize(included) ⇒ Onsi::Includes
Create a new Includes object.
34 35 36 |
# File 'lib/onsi/includes.rb', line 34 def initialize(included) @included = parse_included(included) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/onsi/includes.rb', line 40 def method_missing(name, *args, &block) if name =~ FETCH_METHOD_REGEXP add_fetch_method(name.to_s.gsub(/\Afetch_/, ''), *args, &block) else super end end |
Instance Attribute Details
#included ⇒ Array<Symbol> (readonly)
The includes
25 26 27 |
# File 'lib/onsi/includes.rb', line 25 def included @included end |