class Transit::Symbol

Represents a transit symbol extension type. @see github.com/cognitect/transit-format

Public Class Methods

new(sym) click to toggle source
Calls superclass method Transit::Wrapper::new
# File lib/transit/transit_types.rb, line 40
def initialize(sym)
  super sym.to_sym
end

Public Instance Methods

name() click to toggle source
# File lib/transit/transit_types.rb, line 48
def name
  @name ||= parsed[-1] || "/"
end
namespace() click to toggle source
# File lib/transit/transit_types.rb, line 44
def namespace
  @namespace ||= parsed[-2]
end

Private Instance Methods

parsed() click to toggle source
# File lib/transit/transit_types.rb, line 54
def parsed
  @parsed ||= @value.to_s.split("/")
end