Class: Expressir::Liquid::Statements::RepeatDrop

Inherits:
Expressir::Liquid::StatementDrop show all
Includes:
IdentifierDrop
Defined in:
lib/expressir/liquid/statements/repeat_drop.rb

Instance Method Summary collapse

Methods included from IdentifierDrop

#id, #initialize_identifier, #remark_items, #remarks, #source

Methods inherited from ModelElementDrop

#_class, #file, #source

Constructor Details

#initialize(model) ⇒ RepeatDrop

Returns a new instance of RepeatDrop.



9
10
11
12
13
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 9

def initialize(model)
  @model = model
  initialize_identifier(@model)
  super
end

Instance Method Details

#bound1Object



15
16
17
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 15

def bound1
  drop_klass_by_model(@model.bound1)
end

#bound2Object



19
20
21
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 19

def bound2
  drop_klass_by_model(@model.bound2)
end

#incrementObject



23
24
25
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 23

def increment
  drop_klass_by_model(@model.increment)
end

#statementsObject



35
36
37
38
39
40
41
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 35

def statements
  return [] unless @model.statements

  @model.statements.map do |item|
    ::Expressir::Liquid::StatementDrop.new(item)
  end
end

#until_expressionObject



31
32
33
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 31

def until_expression
  drop_klass_by_model(@model.until_expression)
end

#while_expressionObject



27
28
29
# File 'lib/expressir/liquid/statements/repeat_drop.rb', line 27

def while_expression
  drop_klass_by_model(@model.while_expression)
end