Class: Ambition::Processors::Slice
- Defined in:
- lib/ambition/processors/slice.rb
Instance Method Summary collapse
-
#initialize(context, start, length = nil) ⇒ Slice
constructor
A new instance of Slice.
- #to_s ⇒ Object
Methods inherited from Base
#key, #process, #process_array, #process_dasgn_curr, #process_dvar, #process_false, #process_gvar, #process_ivar, #process_lit, #process_lvar, #process_nil, #process_proc, #process_str, #process_true, #process_vcall, #rubify, #translator, translator, #value
Constructor Details
#initialize(context, start, length = nil) ⇒ Slice
Returns a new instance of Slice.
4 5 6 7 8 |
# File 'lib/ambition/processors/slice.rb', line 4 def initialize(context, start, length=nil) @context = context @start = start @length = length end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/ambition/processors/slice.rb', line 10 def to_s translator.slice(@start, @length) end |