Class: Billogram::RelationBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/billogram/relation_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/billogram/relation_builder.rb', line 5

def attributes
  @attributes
end

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

#callObject



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