Class: Command::OgCommands::PropertyCommand
- Inherits:
-
Command
- Object
- Command
- Command::OgCommands::PropertyCommand
show all
- Defined in:
- lib/command-set/og.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Command
raw_stderr, raw_stdout, wrap_stderr, wrap_stdout
Class Method Details
.editable ⇒ Object
354
355
356
|
# File 'lib/command-set/og.rb', line 354
def editable
optional_argument :value, "The new value"
end
|
.field_name(field) ⇒ Object
344
345
346
347
348
349
350
351
352
|
# File 'lib/command-set/og.rb', line 344
def field_name(field)
define_method(:get_value) do
entity.__send__(field)
end
define_method(:set_value) do |value|
entity.__send__("#{field}=", value)
end
end
|
Instance Method Details
#entity ⇒ Object
335
336
337
|
# File 'lib/command-set/og.rb', line 335
def entity
subject.current_state.last
end
|
#value ⇒ Object
339
340
341
|
# File 'lib/command-set/og.rb', line 339
def value
nil
end
|