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

16 lines
399 B
Ruby

require 'dry-struct'
require 'instapaper/types'
module Instapaper
class Highlight < Dry::Struct
include Types
transform_keys(&:to_sym)
attribute :type, Types::String
attribute :highlight_id, Types::Integer
attribute :bookmark_id, Types::Integer
attribute :text, Types::String
attribute :position, Types::Integer
attribute :time, Types::Integer.optional
end
end