Module: HarvestToInfakt

Defined in:
lib/harvest_to_infakt.rb,
lib/harvest_to_infakt/error.rb,
lib/harvest_to_infakt/resource.rb,
lib/harvest_to_infakt/configuration.rb,
lib/harvest_to_infakt/infakt/client.rb,
lib/harvest_to_infakt/harvest/client.rb,
lib/harvest_to_infakt/infakt/invoice.rb,
lib/harvest_to_infakt/harvest/invoice.rb

Defined Under Namespace

Modules: Harvest, Infakt Classes: Configuration, Error, Resource

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



17
18
19
# File 'lib/harvest_to_infakt.rb', line 17

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/harvest_to_infakt.rb', line 19

def configure
  self.configuration ||= Configuration.new
  yield(configuration)

  HarvestToInfakt::Harvest::Invoice.class_eval do
    base_uri "#{HarvestToInfakt.configuration.harvest[:subdomain]}.harvestapp.com"
  end
  HarvestToInfakt::Harvest::Client.class_eval do
    base_uri "#{HarvestToInfakt.configuration.harvest[:subdomain]}.harvestapp.com"
  end
end