Class: Solid::Parser::LiteralRange

Inherits:
Struct
  • Object
show all
Defined in:
lib/solid/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_valueObject

Returns the value of attribute end_value

Returns:

  • (Object)

    the current value of end_value



34
35
36
# File 'lib/solid/parser.rb', line 34

def end_value
  @end_value
end

#exclusiveObject

Returns the value of attribute exclusive

Returns:

  • (Object)

    the current value of exclusive



34
35
36
# File 'lib/solid/parser.rb', line 34

def exclusive
  @exclusive
end

#start_valueObject

Returns the value of attribute start_value

Returns:

  • (Object)

    the current value of start_value



34
35
36
# File 'lib/solid/parser.rb', line 34

def start_value
  @start_value
end

Instance Method Details

#evaluate(context) ⇒ Object



35
36
37
# File 'lib/solid/parser.rb', line 35

def evaluate(context)
  Range.new(start_value.evaluate(context), end_value.evaluate(context), exclusive)
end