Method: ActiveCMIS::Rendition#initialize
- Defined in:
- lib/active_cmis/rendition.rb
#initialize(repository, document, link) ⇒ Rendition
Returns a new instance of Rendition.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/active_cmis/rendition.rb', line 15 def initialize(repository, document, link) @repository = repository @document = document @rel = link['rel'] == "alternate" @rendition_kind = link['renditionKind'] if rendition? @format = link['type'] if link['href'] @url = URI(link['href']) else # For inline content streams @data = link['data'] end @size = link['length'] ? link['length'].to_i : nil @link = link # FIXME: For debugging purposes only, remove end |