Class: Aspera::Cli::AttrAccessor

Inherits:
Object
  • Object
show all
Defined in:
lib/aspera/cli/manager.rb

Overview

option is retrieved from another object using accessor

Instance Method Summary collapse

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

#valueObject



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