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.
201 202 203 |
# File 'lib/output/writer.rb', line 201 def name @name end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
202 203 204 |
# File 'lib/output/writer.rb', line 202 def variable_name @variable_name end |
Class Method Details
.attribute_name(name) ⇒ Object
212 213 214 |
# File 'lib/output/writer.rb', line 212 def self.attribute_name(name) :"#{name}_writer" end |
.build(name) ⇒ Object
206 207 208 209 210 |
# File 'lib/output/writer.rb', line 206 def self.build(name) attribute_name = attribute_name(name) variable_name = variable_name(name) new attribute_name, variable_name end |
.variable_name(name) ⇒ Object
216 217 218 |
# File 'lib/output/writer.rb', line 216 def self.variable_name(name) :"@#{name}_writer" end |