Class: Output::Writer::Attribute
- Inherits:
-
Object
- Object
- Output::Writer::Attribute
- Includes:
- Initializer
- Defined in:
- lib/output/writer.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#variable_name ⇒ Object
readonly
Returns the value of attribute variable_name.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
199 200 201 |
# File 'lib/output/writer.rb', line 199 def name @name end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
200 201 202 |
# File 'lib/output/writer.rb', line 200 def variable_name @variable_name end |
Class Method Details
.attribute_name(name) ⇒ Object
210 211 212 |
# File 'lib/output/writer.rb', line 210 def self.attribute_name(name) :"#{name}_writer" end |
.build(name) ⇒ Object
204 205 206 207 208 |
# File 'lib/output/writer.rb', line 204 def self.build(name) attribute_name = attribute_name(name) variable_name = variable_name(name) new attribute_name, variable_name end |
.variable_name(name) ⇒ Object
214 215 216 |
# File 'lib/output/writer.rb', line 214 def self.variable_name(name) :"@#{name}_writer" end |