class Frepl::Subroutine

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/frepl/statements/subroutine.rb, line 15
def ==(other)
  if other.is_a?(Subroutine)
    self.name == other.name
  else
    super(other)
  end
end
accept(visitor) click to toggle source
# File lib/frepl/statements/subroutine.rb, line 7
def accept(visitor)
  visitor.visit_subroutine(self)
end
name() click to toggle source
# File lib/frepl/statements/subroutine.rb, line 11
def name
  @name ||= lines.first.match(Frepl::Classifier::SUBROUTINE_REGEX)[1]
end
terminal_regex() click to toggle source
# File lib/frepl/statements/subroutine.rb, line 3
def terminal_regex
  /end subroutine\s?#{Frepl::Classifier::VARIABLE_NAME_REGEX}/
end

Private Instance Methods

starting_regex() click to toggle source
# File lib/frepl/statements/subroutine.rb, line 25
def starting_regex
  Frepl::Classifier::SUBROUTINE_REGEX
end