Class: IngramMicroEngine::Namespace

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



31
32
33
# File 'lib/ingram_micro_engine.rb', line 31

def delimiter
  @delimiter
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



31
32
33
# File 'lib/ingram_micro_engine.rb', line 31

def value
  @value
end

Instance Method Details

#call(name = nil) ⇒ Object



32
33
34
# File 'lib/ingram_micro_engine.rb', line 32

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

#to_regexp(name = nil) ⇒ Object



36
37
38
# File 'lib/ingram_micro_engine.rb', line 36

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