lib/lean-attributes/attributes.rb
# Returns a hash containing defined attribute names and their values.
#
# @return [Hash] defined attributes and their values
#
# @since 0.2.0
# @api public
Returns a hash containing defined attribute names and their values.
Returns a hash containing defined attribute names and their values .
def attributes
        @attributes ||=
          self.class.defined_attributes.each_with_object({}) do |attr, memo|
            memo[attr] = send(attr)
          end
      end
def attributes @attributes ||= self . class . defined_attributes . each_with_object ( { } ) do | attr , memo | memo [ attr ] = send ( attr ) end end
Returns a hash containing defined attribute names and their values.
Returns a hash containing defined attribute names and their values .
defined attributes and their values
defined attributes and their values
Hash
since
None
api
None