Class: PnoteClient::Documents::Hml::EmbeddingBinaryItem
- Inherits:
-
Object
- Object
- PnoteClient::Documents::Hml::EmbeddingBinaryItem
- Defined in:
- lib/pnote_client/documents/hml/embedding_binary_item.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(bin_item_id, bin_item_tag, doc) ⇒ EmbeddingBinaryItem
constructor
A new instance of EmbeddingBinaryItem.
Constructor Details
#initialize(bin_item_id, bin_item_tag, doc) ⇒ EmbeddingBinaryItem
Returns a new instance of EmbeddingBinaryItem.
7 8 9 10 11 12 13 14 15 |
# File 'lib/pnote_client/documents/hml/embedding_binary_item.rb', line 7 def initialize(bin_item_id, bin_item_tag, doc) bin_data_id = bin_item_tag['BinData'] bin_data = doc.at_xpath("//BINDATA[@Id=#{bin_data_id}]") @id = bin_item_id @raw_data = bin_data.content @format = bin_item_tag['Format'] @size = bin_data['Size'].to_i end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/pnote_client/documents/hml/embedding_binary_item.rb', line 5 def format @format end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/pnote_client/documents/hml/embedding_binary_item.rb', line 5 def id @id end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
5 6 7 |
# File 'lib/pnote_client/documents/hml/embedding_binary_item.rb', line 5 def raw_data @raw_data end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
5 6 7 |
# File 'lib/pnote_client/documents/hml/embedding_binary_item.rb', line 5 def size @size end |