Class: Billing::Configuration

Inherits:
Object
  • Object
show all
Defined in:
app/models/billing/configuration.rb

Overview

used to create fields from yml file and store them in memory (see config/initializers/billing.rb)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldsObject

Returns the value of attribute fields


4
5
6
# File 'app/models/billing/configuration.rb', line 4

def fields
  @fields
end

Instance Method Details

#load_file(folder, filename) ⇒ Object


10
11
12
# File 'app/models/billing/configuration.rb', line 10

def load_file(folder, filename)
  YAML.load_file(Rails.root.join(folder, "#{filename}.yml")).with_indifferent_access
end