Class: Attrocity::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/attrocity/attributes/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Attribute

Returns a new instance of Attribute.



6
7
8
# File 'lib/attrocity/attributes/attribute.rb', line 6

def initialize(name, value)
  @name, @value = name, value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/attrocity/attributes/attribute.rb', line 3

def name
  @name
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/attrocity/attributes/attribute.rb', line 4

def value
  @value
end