Class: Expressir::Liquid::Statements::AliasDrop

Inherits:
Expressir::Liquid::StatementDrop show all
Includes:
IdentifierDrop
Defined in:
lib/expressir/liquid/statements/alias_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) ⇒ AliasDrop

Returns a new instance of AliasDrop.



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

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

Instance Method Details

#expressionObject



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

def expression
  drop_klass_by_model(@model.expression)
end

#statementsObject



19
20
21
22
23
24
25
# File 'lib/expressir/liquid/statements/alias_drop.rb', line 19

def statements
  return [] unless @model.statements

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