Class: Billogram::RelationBuilder
- Inherits:
-
Object
- Object
- Billogram::RelationBuilder
- Defined in:
- lib/billogram/relation_builder.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(resource, attributes) ⇒ RelationBuilder
constructor
A new instance of RelationBuilder.
Constructor Details
#initialize(resource, attributes) ⇒ RelationBuilder
Returns a new instance of RelationBuilder.
7 8 9 10 |
# File 'lib/billogram/relation_builder.rb', line 7 def initialize(resource, attributes) @resource = resource @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/billogram/relation_builder.rb', line 5 def attributes @attributes end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
5 6 7 |
# File 'lib/billogram/relation_builder.rb', line 5 def resource @resource end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 |
# File 'lib/billogram/relation_builder.rb', line 12 def call resource_relations.each do |relation| build_relation(relation) end end |