Class: Passfort::Resource::Base
- Inherits:
-
Object
- Object
- Passfort::Resource::Base
- Defined in:
- lib/passfort/resource/base.rb
Direct Known Subclasses
Check, CompanyData, CompanySummary, IndividualData, Profile, Task
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Base
constructor
A new instance of Base.
- #to_h ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/passfort/resource/base.rb', line 12 def initialize(attributes) @attributes = attributes.with_indifferent_access end |
Class Method Details
.attributes(*keys) ⇒ Object
8 9 10 |
# File 'lib/passfort/resource/base.rb', line 8 def self.attributes(*keys) keys.each { |key| define_method(key) { @attributes[key] } } end |
Instance Method Details
#to_h ⇒ Object
16 17 18 |
# File 'lib/passfort/resource/base.rb', line 16 def to_h @attributes end |