Class: Aspera::Cli::AttrAccessor
- Inherits:
-
Object
- Object
- Aspera::Cli::AttrAccessor
- Defined in:
- lib/aspera/cli/manager.rb
Overview
option is retrieved from another object using accessor
Instance Method Summary collapse
-
#initialize(object, attr_symb) ⇒ AttrAccessor
constructor
attr_accessor :object attr_accessor :attr_symb.
- #value ⇒ Object
- #value=(val) ⇒ Object
Constructor Details
#initialize(object, attr_symb) ⇒ AttrAccessor
attr_accessor :object attr_accessor :attr_symb
26 27 28 29 |
# File 'lib/aspera/cli/manager.rb', line 26 def initialize(object,attr_symb) @object=object @attr_symb=attr_symb end |
Instance Method Details
#value ⇒ Object
31 32 33 |
# File 'lib/aspera/cli/manager.rb', line 31 def value @object.send(@attr_symb.to_s) end |
#value=(val) ⇒ Object
35 36 37 |
# File 'lib/aspera/cli/manager.rb', line 35 def value=(val) @object.send(@attr_symb.to_s+'=',val) end |