Class: Graphiti::Sideload::PolymorphicBelongsTo::Group
- Defined in:
- lib/graphiti/sideload/polymorphic_belongs_to.rb
Instance Attribute Summary collapse
-
#calls ⇒ Object
readonly
Returns the value of attribute calls.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Group
constructor
A new instance of Group.
- #method_missing(name, *args, &blk) ⇒ Object
-
#respond_to_missing?(*args) ⇒ Boolean
rubocop: enable Style/MethodMissingSuper.
Constructor Details
#initialize(name) ⇒ Group
Returns a new instance of Group.
5 6 7 8 |
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 5 def initialize(name) @name = name @calls = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
10 11 12 |
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 10 def method_missing(name, *args, &blk) @calls << [name, args, blk] end |
Instance Attribute Details
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
3 4 5 |
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 3 def calls @calls end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 3 def name @name end |
Instance Method Details
#respond_to_missing?(*args) ⇒ Boolean
rubocop: enable Style/MethodMissingSuper
15 16 17 |
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 15 def respond_to_missing?(*args) true end |