class Oshpark::Project
Constants
- STATES
Public Class Methods
attrs()
click to toggle source
# File lib/oshpark/project.rb, line 5 def self.attrs %w| id design_file_url name description top_image bottom_image width_in_mils height_in_mils pcb_layers state layers order_options is_shared | end
write_attrs()
click to toggle source
# File lib/oshpark/project.rb, line 9 def self.write_attrs %w| name description | end
Public Instance Methods
approve()
click to toggle source
# File lib/oshpark/project.rb, line 48 def approve reload_with Oshpark::client.approve_project id end
bottom_image()
click to toggle source
# File lib/oshpark/project.rb, line 24 def bottom_image Image.from_json @bottom_image end
height_in_mils()
click to toggle source
# File lib/oshpark/project.rb, line 44 def height_in_mils @height_in_mils || 0 end
layers()
click to toggle source
# File lib/oshpark/project.rb, line 28 def layers @layers.map do |json| Layer.from_json json end end
order_options()
click to toggle source
# File lib/oshpark/project.rb, line 34 def order_options @order_options.map do |json| OrderOption.from_json json end end
top_image()
click to toggle source
# File lib/oshpark/project.rb, line 20 def top_image Image.from_json @top_image end
width_in_mils()
click to toggle source
# File lib/oshpark/project.rb, line 40 def width_in_mils @width_in_mils || 0 end