Class: DevelopWithPassion::Expander::ArrayDSL
- Defined in:
- lib/developwithpassion_expander/array_dsl.rb
Instance Attribute Summary collapse
-
#mutators ⇒ Object
Returns the value of attribute mutators.
-
#name ⇒ Object
Returns the value of attribute name.
-
#readable ⇒ Object
Returns the value of attribute readable.
-
#visitors ⇒ Object
Returns the value of attribute visitors.
-
#writable ⇒ Object
Returns the value of attribute writable.
Instance Method Summary collapse
-
#initialize(name) ⇒ ArrayDSL
constructor
A new instance of ArrayDSL.
- #mutator(value, &block) ⇒ Object
- #process_using(name, visitor) ⇒ Object
- #read_and_write ⇒ Object
Constructor Details
#initialize(name) ⇒ ArrayDSL
Returns a new instance of ArrayDSL.
6 7 8 9 10 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 6 def initialize(name) @name = name initialize_arrays :mutators,:visitors initialize_false :writable,:readable end |
Instance Attribute Details
#mutators ⇒ Object
Returns the value of attribute mutators.
4 5 6 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 4 def mutators @mutators end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 4 def name @name end |
#readable ⇒ Object
Returns the value of attribute readable.
4 5 6 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 4 def readable @readable end |
#visitors ⇒ Object
Returns the value of attribute visitors.
4 5 6 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 4 def visitors @visitors end |
#writable ⇒ Object
Returns the value of attribute writable.
4 5 6 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 4 def writable @writable end |
Instance Method Details
#mutator(value, &block) ⇒ Object
12 13 14 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 12 def mutator(value,&block) @mutators.push(ArrayMutator.new(value,block)) end |
#process_using(name, visitor) ⇒ Object
16 17 18 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 16 def process_using(name,visitor) @visitors.push(ArrayVisitor.new(name,visitor)) end |
#read_and_write ⇒ Object
20 21 22 23 |
# File 'lib/developwithpassion_expander/array_dsl.rb', line 20 def read_and_write writable readable end |