Skip to content

Commit

Permalink
Add class method kinds to Machine and Specialist (#144)
Browse files Browse the repository at this point in the history
* Add class method `kinds` to `Machine` and `Specialist`

* Lint fix
  • Loading branch information
srozen authored Apr 17, 2023
1 parent c38cc64 commit 7bdeb73
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Add class method `kinds` to `Machine` and `Specialist`

## [0.15.1]

* Add translations for `kind` attribute for `Machine` and `Specialist`
Expand Down
10 changes: 10 additions & 0 deletions lib/zaikio/hub/machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ class Machine < Base
# Attributes
attributes :name, :updated_at, :created_at, :site_id, :kind, :capabilities,
:manufacturer_id, :serial_number, :manufacturer, :owner_id

def self.kinds
%w[sheetfed_digital_press web_digital_press digital_press sheetfed_offset_press
web_offset_press offset_press cutter shape_cutter folder box_maker
gatherer stitcher adhesive_binder trimmer thread_sewer case_maker
box_packer ctp platesetter flexo_press silkscreen_press web_silkscreen_press
inkjet_press web_inkjet_press letterpress_press pad_press laminator
corner_rounder spindle_drill binder book_puncher perforator eyeletter drill
drill_puncher notcher].freeze
end
end
end
end
4 changes: 4 additions & 0 deletions lib/zaikio/hub/specialist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class Specialist < Base

# Attributes
attributes :name, :updated_at, :created_at, :site_id, :kind, :owner_id, :capabilities

def self.kinds
%w[shipping other boxing].freeze
end
end
end
end

0 comments on commit 7bdeb73

Please sign in to comment.