instapaper/lib/instapaper/folder.rb
Sami Samhuri 07303c9be5
Replace Virtus with dry-struct for attributes and type coercion
- Convert all model classes to Dry::Struct

- Add Types module with StringOrInteger and BooleanFlag
2025-06-08 16:54:19 -07:00

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