class Coolsms::Base
Attributes
attributes[RW]
response[R]
retrieved[RW]
Public Instance Methods
[](key)
click to toggle source
# File lib/coolsms/base.rb, line 12 def [](key) value = attributes[key] if value.nil? && !retrieved retrieve attributes[key] else value end end
id()
click to toggle source
# File lib/coolsms/base.rb, line 22 def id attributes[:id] end
refresh!()
click to toggle source
# File lib/coolsms/base.rb, line 26 def refresh! @attributes = {id: attributes[:id]} @retrieved = false retrieve end
retrieve()
click to toggle source
# File lib/coolsms/base.rb, line 6 def retrieve self ensure @retrieved = true end