Module: AttributesDSL::InstanceMethods

Defined in:
lib/attributes_dsl.rb

Overview

Defines instance methods for the hash of attributes and its initializer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesHash (readonly)

Returns the hash of initialized attributes.

Returns:

  • (Hash)

    the hash of initialized attributes



84
85
86
# File 'lib/attributes_dsl.rb', line 84

def attributes
  @attributes
end

Instance Method Details

#initialize(attributes) ⇒ Object

Initializes the object and sets the hash of its [#attributes]

Uses attributes prepared by [.new]

Parameters:

  • attributes (Hash)


92
93
94
# File 'lib/attributes_dsl.rb', line 92

def initialize(attributes)
  @attributes = attributes
end