Method: Wayback::Base#attrs

Defined in:
lib/wayback/base.rb

#attrsHash Also known as: to_hash

Retrieve the attributes of an object

Returns:

  • (Hash)


95
96
97
98
99
# File 'lib/wayback/base.rb', line 95

def attrs
  @attrs.inject({}) do |attrs, (key, value)|
    attrs.merge!(key => respond_to?(key) ? send(key) : value)
  end
end