Class: Pinpoint::Format::Token
- Inherits:
-
Struct
- Object
- Struct
- Pinpoint::Format::Token
- Defined in:
- lib/pinpoint/format/token.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Token
constructor
A new instance of Token.
- #processed_value ⇒ Object
- #to_ary ⇒ Object
Constructor Details
#initialize(*args) ⇒ Token
Returns a new instance of Token.
6 7 8 9 10 |
# File 'lib/pinpoint/format/token.rb', line 6 def initialize(*args) args[0] = args[0].to_sym super end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type
5 6 7 |
# File 'lib/pinpoint/format/token.rb', line 5 def type @type end |
#value ⇒ Object
Returns the value of attribute value
5 6 7 |
# File 'lib/pinpoint/format/token.rb', line 5 def value @value end |
Instance Method Details
#processed_value ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pinpoint/format/token.rb', line 12 def processed_value case type when :group_start :group_start when :group_end :group_end when :literal value else end end |
#to_ary ⇒ Object
25 26 27 |
# File 'lib/pinpoint/format/token.rb', line 25 def to_ary [type, value] end |