instapaper/lib/instapaper/user.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

14 lines
333 B
Ruby

require 'dry-struct'
require 'instapaper/types'
module Instapaper
class User < Dry::Struct
include Types
transform_keys(&:to_sym)
attribute :username, Types::String
attribute :user_id, Types::Integer
attribute :type, Types::String
attribute? :subscription_is_active, Types::BooleanFlag.optional
end
end