Class: Blockhead::AliasKey
- Inherits:
-
Object
- Object
- Blockhead::AliasKey
- Defined in:
- lib/blockhead/alias_key.rb
Instance Attribute Summary collapse
-
#alias_key ⇒ Object
readonly
Returns the value of attribute alias_key.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
Instance Method Summary collapse
-
#initialize(name, alias_key) ⇒ AliasKey
constructor
A new instance of AliasKey.
- #key ⇒ Object
Constructor Details
#initialize(name, alias_key) ⇒ AliasKey
Returns a new instance of AliasKey.
5 6 7 8 |
# File 'lib/blockhead/alias_key.rb', line 5 def initialize(name, alias_key) @default = name @alias_key = alias_key end |
Instance Attribute Details
#alias_key ⇒ Object (readonly)
Returns the value of attribute alias_key.
3 4 5 |
# File 'lib/blockhead/alias_key.rb', line 3 def alias_key @alias_key end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
3 4 5 |
# File 'lib/blockhead/alias_key.rb', line 3 def default @default end |
Instance Method Details
#key ⇒ Object
10 11 12 |
# File 'lib/blockhead/alias_key.rb', line 10 def key send(:"alias_#{aliased_key?}") end |