Module: ActiveMocker::AliasAttribute
- Included in:
- Base
- Defined in:
- lib/active_mocker/mock/alias_attribute.rb
Instance Method Summary collapse
-
#attribute_alias(name) ⇒ Object
Returns the original name for the alias
name
. -
#attribute_alias?(new_name) ⇒ Boolean
Is
new_name
an alias?.
Instance Method Details
#attribute_alias(name) ⇒ Object
Returns the original name for the alias name
9 10 11 |
# File 'lib/active_mocker/mock/alias_attribute.rb', line 9 def attribute_alias(name) attribute_aliases[name.to_s] end |
#attribute_alias?(new_name) ⇒ Boolean
Is new_name
an alias?
4 5 6 |
# File 'lib/active_mocker/mock/alias_attribute.rb', line 4 def attribute_alias?(new_name) attribute_aliases.key? new_name.to_s end |