Class: Tamashii::Config::Attribute::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/tamashii/config/attribute.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(target, attribute) ⇒ Reference

Returns a new instance of Reference.



21
22
23
24
# File 'lib/tamashii/config/attribute.rb', line 21

def initialize(target, attribute)
  @target = target
  @attribute = attribute
end

Instance Method Details

#sync(value) ⇒ Object



30
31
32
# File 'lib/tamashii/config/attribute.rb', line 30

def sync(value)
  @target[@attribute] = value
end

#valueObject



26
27
28
# File 'lib/tamashii/config/attribute.rb', line 26

def value
  @target[@attribute]
end