Class: Oshpark::Panel

Inherits:
Object
  • Object
show all
Includes:
Model, RemoteModel, Stateful
Defined in:
lib/oshpark/panel.rb

Constant Summary collapse

STATES =
%w| OPEN ORDERED RECEIVED |

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Stateful

included

Methods included from RemoteModel

#destroy!, included, #reload!, #save!

Methods included from Model

#dirty?, included, #initialize

Class Method Details

.attrsObject



5
6
7
8
9
# File 'lib/oshpark/panel.rb', line 5

def self.attrs
  %w| pcb_layers scheduled_order_time expected_receive_time
      id ordered_at received_at state service total_orders
      total_boards board_area_in_square_mils |
end

Instance Method Details

#expected_receive_timeObject



19
20
21
# File 'lib/oshpark/panel.rb', line 19

def expected_receive_time
  time_from @expected_receive_time if @expected_receive_time
end

#ordered_atObject



23
24
25
# File 'lib/oshpark/panel.rb', line 23

def ordered_at
  time_from @ordered_at if @ordered_at
end

#received_atObject



27
28
29
# File 'lib/oshpark/panel.rb', line 27

def received_at
  time_from @received_at if @received_at
end

#scheduled_order_timeObject



15
16
17
# File 'lib/oshpark/panel.rb', line 15

def scheduled_order_time
  time_from @scheduled_order_time if @scheduled_order_time
end