Class: Shouter::Listener
- Inherits:
-
Object
- Object
- Shouter::Listener
- Defined in:
- lib/shouter/listener.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #for?(scope) ⇒ Boolean
-
#initialize(object, options) ⇒ Listener
constructor
A new instance of Listener.
- #single? ⇒ Boolean
Constructor Details
#initialize(object, options) ⇒ Listener
Returns a new instance of Listener.
12 13 14 15 16 17 |
# File 'lib/shouter/listener.rb', line 12 def initialize(object, ) raise Shouter::ScopeMissingError unless [:scope] @object = object = end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
10 11 12 |
# File 'lib/shouter/listener.rb', line 10 def object @object end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/shouter/listener.rb', line 10 def end |
Instance Method Details
#for?(scope) ⇒ Boolean
19 20 21 |
# File 'lib/shouter/listener.rb', line 19 def for?(scope) [:scope] == scope end |
#single? ⇒ Boolean
23 24 25 |
# File 'lib/shouter/listener.rb', line 23 def single? [:single] == true end |