Class: Transit::Symbol
Overview
Represents a transit symbol extension type.
Instance Attribute Summary
Attributes inherited from Wrapper
Instance Method Summary collapse
-
#initialize(sym) ⇒ Symbol
constructor
A new instance of Symbol.
- #name ⇒ Object
- #namespace ⇒ Object
Methods inherited from Wrapper
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
#name ⇒ Object
48 49 50 |
# File 'lib/transit/transit_types.rb', line 48 def name @name ||= parsed[-1] || "/" end |
#namespace ⇒ Object
44 45 46 |
# File 'lib/transit/transit_types.rb', line 44 def namespace @namespace ||= parsed[-2] end |