class Syntax::Respond

Attributes

http_status[R]
view[R]

Public Instance Methods

parse() click to toggle source
# File lib/dandy/routing/syntax/respond.rb, line 5
def parse
  if elements.length > 0
    elements[0].elements[1].elements.each do |element|
      if element.is_a? View
        @view = element.parse
      end

      if element.is_a? HttpStatus
        @http_status = element.parse
      end
    end
  end

  self
end
to_hash() click to toggle source
# File lib/dandy/routing/syntax/respond.rb, line 21
def to_hash
  {view: @view, http_status: @http_status}
end