Module: Googletastic::Mixins::Attributes

Included in:
Attendee, Base, Thumbnail
Defined in:
lib/googletastic/mixins/attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

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_namesObject



14
15
16
# File 'lib/googletastic/mixins/attributes.rb', line 14

def attribute_names
  @attributes.keys.sort
end

#has_attribute?(attr_name) ⇒ Boolean

Returns:

  • (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

#inspectObject



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