Class: SquareEvent::Namespace

Inherits:
Struct
  • Object
show all
Defined in:
lib/square_event.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



37
38
39
# File 'lib/square_event.rb', line 37

def delimiter
  @delimiter
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



37
38
39
# File 'lib/square_event.rb', line 37

def value
  @value
end

Instance Method Details

#call(name = nil) ⇒ Object



38
39
40
# File 'lib/square_event.rb', line 38

def call(name = nil)
  "#{value}#{delimiter}#{name}"
end

#to_regexp(name = nil) ⇒ Object



42
43
44
# File 'lib/square_event.rb', line 42

def to_regexp(name = nil)
  %r{^#{Regexp.escape call(name)}}
end