Class: SAXMachine::SAXConfig::ElementValueConfig
- Inherits:
-
Object
- Object
- SAXMachine::SAXConfig::ElementValueConfig
- Defined in:
- lib/sax-machine/config/sax_element_value.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#setter ⇒ Object
readonly
Returns the value of attribute setter.
Instance Method Summary collapse
- #column ⇒ Object
-
#initialize(name, options) ⇒ ElementValueConfig
constructor
A new instance of ElementValueConfig.
- #required? ⇒ Boolean
Constructor Details
#initialize(name, options) ⇒ ElementValueConfig
Returns a new instance of ElementValueConfig.
6 7 8 9 10 11 |
# File 'lib/sax-machine/config/sax_element_value.rb', line 6 def initialize(name, ) @name = name.to_s @as = [:as] @setter = "#{@as}=" @required = [:required] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sax-machine/config/sax_element_value.rb', line 4 def name @name end |
#setter ⇒ Object (readonly)
Returns the value of attribute setter.
4 5 6 |
# File 'lib/sax-machine/config/sax_element_value.rb', line 4 def setter @setter end |
Instance Method Details
#column ⇒ Object
13 14 15 |
# File 'lib/sax-machine/config/sax_element_value.rb', line 13 def column @as || @name.to_sym end |
#required? ⇒ Boolean
17 18 19 |
# File 'lib/sax-machine/config/sax_element_value.rb', line 17 def required? !!@required end |