Class: EventSubEvents::Namespace
- Inherits:
-
Struct
- Object
- Struct
- EventSubEvents::Namespace
- Defined in:
- lib/event_sub_events.rb
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
Returns the value of attribute delimiter.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#delimiter ⇒ Object
Returns the value of attribute delimiter
46 47 48 |
# File 'lib/event_sub_events.rb', line 46 def delimiter @delimiter end |
#value ⇒ Object
Returns the value of attribute value
46 47 48 |
# File 'lib/event_sub_events.rb', line 46 def value @value end |
Instance Method Details
#call(name = nil) ⇒ Object
47 48 49 |
# File 'lib/event_sub_events.rb', line 47 def call(name = nil) "#{value}#{delimiter}#{name}" end |
#to_regexp(name = nil) ⇒ Object
51 52 53 |
# File 'lib/event_sub_events.rb', line 51 def to_regexp(name = nil) %r{^#{Regexp.escape call(name)}} end |