Module: Googletastic::Mixins::Attributes
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
2 3 4 |
# File 'lib/googletastic/mixins/attributes.rb', line 2 def attributes @attributes end |
Instance Method Details
#attribute_names ⇒ Object
14 15 16 |
# File 'lib/googletastic/mixins/attributes.rb', line 14 def attribute_names @attributes.keys.sort end |
#has_attribute?(attr_name) ⇒ Boolean
18 19 20 |
# File 'lib/googletastic/mixins/attributes.rb', line 18 def has_attribute?(attr_name) @attributes.has_key?(attr_name.to_s) end |
#inspect ⇒ Object
22 23 24 25 26 |
# File 'lib/googletastic/mixins/attributes.rb', line 22 def inspect hash = "" attributes.each { |k,v| hash << " @#{k.to_s}=#{v.inspect}" unless k.to_s == "raw" } "#<#{self.class.to_s}#{hash}/>" end |