Class: Tinysky::LinkFacet
- Inherits:
-
Object
- Object
- Tinysky::LinkFacet
- Defined in:
- lib/tinysky/link_facet.rb
Instance Method Summary collapse
-
#initialize(byte_start, byte_end, uri) ⇒ LinkFacet
constructor
A new instance of LinkFacet.
- #to_hash ⇒ Object
Constructor Details
#initialize(byte_start, byte_end, uri) ⇒ LinkFacet
Returns a new instance of LinkFacet.
3 4 5 6 7 |
# File 'lib/tinysky/link_facet.rb', line 3 def initialize(byte_start, byte_end, uri) @byte_start = byte_start @byte_end = byte_end @uri = uri end |
Instance Method Details
#to_hash ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tinysky/link_facet.rb', line 9 def to_hash { "features" => [ { "$type" => Tinysky::Lexicon::LINK_FACET, "uri" => @uri } ], "index" => { "byteEnd" => @byte_end, "byteStart" => @byte_start } } end |