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



24
25
26
# File 'lib/solid/parser.rb', line 24

def end_value
  @end_value
end

#exclusiveObject

Returns the value of attribute exclusive

Returns:

  • (Object)

    the current value of exclusive



24
25
26
# File 'lib/solid/parser.rb', line 24

def exclusive
  @exclusive
end

#start_valueObject

Returns the value of attribute start_value

Returns:

  • (Object)

    the current value of start_value



24
25
26
# File 'lib/solid/parser.rb', line 24

def start_value
  @start_value
end

Instance Method Details

#evaluate(context) ⇒ Object



25
26
27
# File 'lib/solid/parser.rb', line 25

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