Module: Assertion::DSL::Attribute
- Included in:
- Guard
- Defined in:
- lib/assertion/dsl/attribute.rb
Overview
Allows adding aliases to ‘#object` method.
Class Method Summary collapse
Instance Method Summary collapse
-
#attribute(name) ⇒ undefined
Adds alias to the [#object] method.
Class Method Details
.extended(klass) ⇒ Object
29 30 31 |
# File 'lib/assertion/dsl/attribute.rb', line 29 def self.extended(klass) klass.__send__ :attr_reader, :object end |
Instance Method Details
#attribute(name) ⇒ undefined
Adds alias to the [#object] method
23 24 25 26 |
# File 'lib/assertion/dsl/attribute.rb', line 23 def attribute(name) __check_attribute__(name) alias_method name, :object end |