Class: Argstring::Token
- Inherits:
-
Object
- Object
- Argstring::Token
- Defined in:
- lib/argstring/models/token.rb
Instance Attribute Summary collapse
-
#enclosed ⇒ Object
readonly
Returns the value of attribute enclosed.
-
#enclosure ⇒ Object
readonly
Returns the value of attribute enclosure.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #enclosed? ⇒ Boolean
-
#initialize(text:, raw:, enclosed: false, enclosure: nil) ⇒ Token
constructor
enclosure is a hash close: or nil.
Constructor Details
#initialize(text:, raw:, enclosed: false, enclosure: nil) ⇒ Token
enclosure is a hash close: or nil
8 9 10 11 12 13 |
# File 'lib/argstring/models/token.rb', line 8 def initialize(text:, raw:, enclosed: false, enclosure: nil) @text = text @raw = raw @enclosed = enclosed @enclosure = enclosure end |
Instance Attribute Details
#enclosed ⇒ Object (readonly)
Returns the value of attribute enclosed.
5 6 7 |
# File 'lib/argstring/models/token.rb', line 5 def enclosed @enclosed end |
#enclosure ⇒ Object (readonly)
Returns the value of attribute enclosure.
5 6 7 |
# File 'lib/argstring/models/token.rb', line 5 def enclosure @enclosure end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/argstring/models/token.rb', line 5 def raw @raw end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/argstring/models/token.rb', line 5 def text @text end |
Instance Method Details
#enclosed? ⇒ Boolean
15 16 17 |
# File 'lib/argstring/models/token.rb', line 15 def enclosed? @enclosed end |