Class: Mihari::Structs::BinaryEdge::Response
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::BinaryEdge::Response
- Defined in:
- lib/mihari/structs/binaryedge.rb
Instance Attribute Summary collapse
- #events ⇒ Array<Event> readonly
- #page ⇒ Integer readonly
- #pagesize ⇒ Integer readonly
- #total ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#events ⇒ Array<Event> (readonly)
57 |
# File 'lib/mihari/structs/binaryedge.rb', line 57 attribute :events, Types.Array(Event) |
#page ⇒ Integer (readonly)
45 |
# File 'lib/mihari/structs/binaryedge.rb', line 45 attribute :page, Types::Int |
Class Method Details
.from_dynamic!(d) ⇒ Object
70 71 72 73 74 75 76 77 78 |
# File 'lib/mihari/structs/binaryedge.rb', line 70 def from_dynamic!(d) d = Types::Hash[d] new( page: d.fetch("page"), pagesize: d.fetch("pagesize"), total: d.fetch("total"), events: d.fetch("events").map { |x| Event.from_dynamic!(x) } ) end |