class Parkeon::Ticket
Constants
- ATTR_NAME_SELECTOR
- ATTR_SELECTOR
- ATTR_VALUE_SELECTOR
- BASE_SELECTOR
CONSTANTS
Public Class Methods
all()
click to toggle source
CLASS METHODS
# File lib/parkeon/ticket.rb, line 26 def self.all get_tickets.css(BASE_SELECTOR).map {|node| from_node(node) } end
from_node(node)
click to toggle source
# File lib/parkeon/ticket.rb, line 30 def self.from_node(node) attributes = {} node.css(ATTR_SELECTOR).each do |member| key = member.at_css(ATTR_NAME_SELECTOR).try(:text) value = member.at_css(ATTR_VALUE_SELECTOR).try(:text) if key && value attributes[key] = value end end new(attributes) end
Private Class Methods
get_tickets()
click to toggle source
# File lib/parkeon/ticket.rb, line 47 def self.get_tickets Session.create.invoke("get_tickets") {} end