Class: Solid::Arguments
- Inherits:
-
Object
- Object
- Solid::Arguments
- Includes:
- Enumerable
- Defined in:
- lib/solid/arguments.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
- #each(*args, &block) ⇒ Object
-
#initialize(string) ⇒ Arguments
constructor
A new instance of Arguments.
- #interpolate(context) ⇒ Object
- #parse! ⇒ Object
Constructor Details
#initialize(string) ⇒ Arguments
Returns a new instance of Arguments.
12 13 14 |
# File 'lib/solid/arguments.rb', line 12 def initialize(string) @string = string end |
Instance Attribute Details
#values ⇒ Object
Returns the value of attribute values.
10 11 12 |
# File 'lib/solid/arguments.rb', line 10 def values @values end |
Class Method Details
.parse(string) ⇒ Object
6 7 8 |
# File 'lib/solid/arguments.rb', line 6 def self.parse(string) new("[#{string}]").parse! end |
Instance Method Details
#each(*args, &block) ⇒ Object
21 22 23 |
# File 'lib/solid/arguments.rb', line 21 def each(*args, &block) values.each(*args, &block) end |
#interpolate(context) ⇒ Object
25 26 27 |
# File 'lib/solid/arguments.rb', line 25 def interpolate(context) values.evaluate(context) end |