Class: Klipbook::Clipping
- Defined in:
- lib/klipbook/sources/clipping.rb
Instance Attribute Summary collapse
-
#annotation_id ⇒ Object
Returns the value of attribute annotation_id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#page ⇒ Object
Returns the value of attribute page.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Methods inherited from Struct
Instance Attribute Details
#annotation_id ⇒ Object
Returns the value of attribute annotation_id
2 3 4 |
# File 'lib/klipbook/sources/clipping.rb', line 2 def annotation_id @annotation_id end |
#location ⇒ Object
Returns the value of attribute location
2 3 4 |
# File 'lib/klipbook/sources/clipping.rb', line 2 def location @location end |
#page ⇒ Object
Returns the value of attribute page
2 3 4 |
# File 'lib/klipbook/sources/clipping.rb', line 2 def page @page end |
#text ⇒ Object
Returns the value of attribute text
2 3 4 |
# File 'lib/klipbook/sources/clipping.rb', line 2 def text @text end |
#type ⇒ Object
Returns the value of attribute type
2 3 4 |
# File 'lib/klipbook/sources/clipping.rb', line 2 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/klipbook/sources/clipping.rb', line 3 def self.from_hash(hash) self.new.tap do |b| b.annotation_id = hash['annotation_id'] b.text = hash['text'] b.location = hash['location'] b.type = hash['type'] b.page = hash['page'] end end |