Class: Liquid::Tag::AttributeParser
- Inherits:
-
Object
- Object
- Liquid::Tag::AttributeParser
- Defined in:
- lib/liquid/tag/attribute_parser.rb,
lib/liquid/tag/attribute_parser/version.rb
Overview
:nodoc:
Constant Summary collapse
- STRING_ATTRIBUTES =
TODO: Improve the key selecting regexp
/[^\s]+=(?:'[^']+')|[^\s]+=(?:"[^"]+")/.freeze
- BOOLEAN_ATTRIBUTES =
/[^\s]+=(?:true|false)/.freeze
- NUMBER_ATTRIBUTES =
/[^\s]+=(?:[+-]?(?:[0-9]*[.])?[0-9]+)/.freeze
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(raw) ⇒ AttributeParser
constructor
A new instance of AttributeParser.
Constructor Details
#initialize(raw) ⇒ AttributeParser
Returns a new instance of AttributeParser.
15 16 17 18 19 20 |
# File 'lib/liquid/tag/attribute_parser.rb', line 15 def initialize(raw) @raw = raw @attributes = {} parse end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
13 14 15 |
# File 'lib/liquid/tag/attribute_parser.rb', line 13 def attributes @attributes end |