Class: EventSubEvents::Namespace

Inherits:
Struct
  • Object
show all
Defined in:
lib/event_sub_events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delimiterObject

Returns the value of attribute delimiter

Returns:

  • (Object)

    the current value of delimiter



46
47
48
# File 'lib/event_sub_events.rb', line 46

def delimiter
  @delimiter
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of 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