Class: AFCSalesforce::Models::Base
- Inherits:
-
Object
- Object
- AFCSalesforce::Models::Base
- Extended by:
- Concerns::TypeSetter
- Defined in:
- lib/afc_salesforce/models/base.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #to_h ⇒ Object
Methods included from Concerns::TypeSetter
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/afc_salesforce/models/base.rb', line 6 def initialize(={}) .each do |attribute_name, attribute_value| self.send("#{attribute_name}=".to_sym, attribute_value) end end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/afc_salesforce/models/base.rb', line 12 def to_h {}.select{ |k,v| !v.nil? } end |