mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-15 12:25:47 +00:00
- Convert all model classes to Dry::Struct - Add Types module with StringOrInteger and BooleanFlag
16 lines
399 B
Ruby
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
|