Class: AttributeExtras::Modifier

Inherits:
Object
  • Object
show all
Defined in:
lib/attribute_extras/modifier.rb

Overview

a container for an attribute that has been modified

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute, options = {}) ⇒ Modifier

store the given options



13
14
15
16
# File 'lib/attribute_extras/modifier.rb', line 13

def initialize(attribute, options = {})
  @attribute = attribute
  @options = options
end

Instance Attribute Details

#attributeObject (readonly)

the attribute this modifier represents



7
8
9
# File 'lib/attribute_extras/modifier.rb', line 7

def attribute
  @attribute
end

#optionsObject (readonly)

the set of options generated for this attribute



10
11
12
# File 'lib/attribute_extras/modifier.rb', line 10

def options
  @options
end