mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-03-31 09:55:54 +00:00
- Convert all model classes to Dry::Struct - Add Types module with StringOrInteger and BooleanFlag
17 lines
446 B
Ruby
17 lines
446 B
Ruby
require 'dry-struct'
|
|
require 'instapaper/types'
|
|
|
|
module Instapaper
|
|
class Folder < Dry::Struct
|
|
include Types
|
|
transform_keys(&:to_sym)
|
|
|
|
attribute :title, Types::String
|
|
attribute? :display_title, Types::String
|
|
attribute :sync_to_mobile, Types::BooleanFlag
|
|
attribute :folder_id, Types::Integer
|
|
attribute :position, Types::Coercible::Float
|
|
attribute :type, Types::String
|
|
attribute? :slug, Types::String
|
|
end
|
|
end
|