Class: Transit::Symbol

Inherits:
Wrapper show all
Defined in:
lib/transit/transit_types.rb

Overview

Represents a transit symbol extension type.

Instance Attribute Summary

Attributes inherited from Wrapper

#value

Instance Method Summary collapse

Methods inherited from Wrapper

#==, #inspect

Constructor Details

#initialize(sym) ⇒ Symbol

Returns a new instance of Symbol.



40
41
42
# File 'lib/transit/transit_types.rb', line 40

def initialize(sym)
  super sym.to_sym
end

Instance Method Details

#nameObject



48
49
50
# File 'lib/transit/transit_types.rb', line 48

def name
  @name ||= parsed[-1] || "/"
end

#namespaceObject



44
45
46
# File 'lib/transit/transit_types.rb', line 44

def namespace
  @namespace ||= parsed[-2]
end