Class: Graphiti::Sideload::PolymorphicBelongsTo::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/graphiti/sideload/polymorphic_belongs_to.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#callsObject (readonly)

Returns the value of attribute calls.



3
4
5
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 3

def calls
  @calls
end

#nameObject (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

Returns:

  • (Boolean)


15
16
17
# File 'lib/graphiti/sideload/polymorphic_belongs_to.rb', line 15

def respond_to_missing?(*args)
  true
end