Module: Quandl::Client::Base::Attributes

Extended by:
ActiveSupport::Concern
Defined in:
lib/quandl/client/base/attributes.rb

Instance Method Summary collapse

Instance Method Details

#read_attribute(attribute) ⇒ Object



11
12
13
# File 'lib/quandl/client/base/attributes.rb', line 11

def read_attribute(attribute)
  @attributes[:"#{attribute}"]
end

#write_attribute(attribute, value) ⇒ Object



6
7
8
9
# File 'lib/quandl/client/base/attributes.rb', line 6

def write_attribute(attribute, value)
  self.send(:"#{attribute}_will_change!") if @attributes[:"#{attribute}"] != value
  @attributes[:"#{attribute}"] = value
end