Class: Aspector::DeferredOption
- Inherits:
-
Object
- Object
- Aspector::DeferredOption
- Defined in:
- lib/aspector/deferred_option.rb
Overview
Object used to store deferred options
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(key = nil) ⇒ DeferredOption
constructor
A new instance of DeferredOption.
- #to_s ⇒ Object
Constructor Details
#initialize(key = nil) ⇒ DeferredOption
Returns a new instance of DeferredOption.
6 7 8 |
# File 'lib/aspector/deferred_option.rb', line 6 def initialize(key = nil) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/aspector/deferred_option.rb', line 4 def key @key end |
Instance Method Details
#[](key) ⇒ Object
10 11 12 13 |
# File 'lib/aspector/deferred_option.rb', line 10 def [](key) @key = key self end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/aspector/deferred_option.rb', line 15 def to_s "options[#{(key || '?').inspect}]" end |