Class: CommandBuilder::CodeGenerator::CommandDefinition
- Inherits:
-
Object
- Object
- CommandBuilder::CodeGenerator::CommandDefinition
- Defined in:
- lib/command_builder/code_generator/command_definition.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#versions ⇒ Object
readonly
Returns the value of attribute versions.
Instance Method Summary collapse
-
#initialize(stream) ⇒ CommandDefinition
constructor
A new instance of CommandDefinition.
Constructor Details
#initialize(stream) ⇒ CommandDefinition
Returns a new instance of CommandDefinition.
10 11 12 13 14 |
# File 'lib/command_builder/code_generator/command_definition.rb', line 10 def initialize(stream) s = stream.read @versions = parse_versions s.first_line @command = Command.new s.strip_first_line end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
8 9 10 |
# File 'lib/command_builder/code_generator/command_definition.rb', line 8 def command @command end |
#versions ⇒ Object (readonly)
Returns the value of attribute versions.
8 9 10 |
# File 'lib/command_builder/code_generator/command_definition.rb', line 8 def versions @versions end |