Class: Daifuku::StrdefGenerator::LogColumn
- Inherits:
-
Object
- Object
- Daifuku::StrdefGenerator::LogColumn
- Defined in:
- lib/daifuku/strdef_generator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #common? ⇒ Boolean
-
#initialize(name, type, is_common = false) ⇒ LogColumn
constructor
A new instance of LogColumn.
- #strdef ⇒ Object
Constructor Details
#initialize(name, type, is_common = false) ⇒ LogColumn
Returns a new instance of LogColumn.
96 97 98 99 100 |
# File 'lib/daifuku/strdef_generator.rb', line 96 def initialize(name, type, is_common = false) @name = name @type = type @is_common = is_common end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
102 103 104 |
# File 'lib/daifuku/strdef_generator.rb', line 102 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
103 104 105 |
# File 'lib/daifuku/strdef_generator.rb', line 103 def type @type end |
Instance Method Details
#common? ⇒ Boolean
105 106 107 |
# File 'lib/daifuku/strdef_generator.rb', line 105 def common? @is_common end |
#strdef ⇒ Object
109 110 111 112 113 114 115 |
# File 'lib/daifuku/strdef_generator.rb', line 109 def strdef if type.str_length "#{name}: !#{type.name} #{type.str_length}" else "#{name}: !#{type.name}" end end |