Class: Daifuku::StrdefGenerator::StreamColumn
- Inherits:
-
Object
- Object
- Daifuku::StrdefGenerator::StreamColumn
- Defined in:
- lib/daifuku/strdef_generator.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, length = nil) ⇒ StreamColumn
constructor
A new instance of StreamColumn.
- #strdef ⇒ Object
Constructor Details
#initialize(name, type, length = nil) ⇒ StreamColumn
Returns a new instance of StreamColumn.
40 41 42 43 44 |
# File 'lib/daifuku/strdef_generator.rb', line 40 def initialize(name, type, length = nil) @name = name @type = type @length = length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
48 49 50 |
# File 'lib/daifuku/strdef_generator.rb', line 48 def length @length end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
46 47 48 |
# File 'lib/daifuku/strdef_generator.rb', line 46 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
47 48 49 |
# File 'lib/daifuku/strdef_generator.rb', line 47 def type @type end |
Instance Method Details
#strdef ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/daifuku/strdef_generator.rb', line 50 def strdef if length "#{name}: !#{type} #{length}" else "#{name}: !#{type}" end end |