Class: Towsta::Kinds::VideoKind

Inherits:
MainKind
  • Object
show all
Defined in:
lib/towsta/kinds/video.rb

Instance Attribute Summary

Attributes inherited from MainKind

#content

Instance Method Summary collapse

Methods inherited from MainKind

#compare_parameterized, #export, #get, #initialize, #kind

Constructor Details

This class inherits a constructor from Towsta::Kinds::MainKind

Instance Method Details

#compare(object) ⇒ Object



15
16
17
# File 'lib/towsta/kinds/video.rb', line 15

def compare object
  @content.to_s == object.to_s
end

#set(content) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/towsta/kinds/video.rb', line 6

def set content
  return @content = content if content.class == Cameraman::VideoReference
  begin
    @content = Cameraman::VideoReference.new JSON.parse(content, :symbolize_names => true)
  rescue
    @content = nil
  end
end