Class: Zm::Client::Signature
Overview
Instance Attribute Summary collapse
Attributes inherited from Base::Object
#parent, #token
Instance Method Summary
collapse
#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute
Instance Attribute Details
#html ⇒ Object
Returns the value of attribute html.
7
8
9
|
# File 'lib/zm/client/signature/signature.rb', line 7
def html
@html
end
|
#id ⇒ Object
Returns the value of attribute id.
7
8
9
|
# File 'lib/zm/client/signature/signature.rb', line 7
def id
@id
end
|
#name ⇒ Object
Returns the value of attribute name.
7
8
9
|
# File 'lib/zm/client/signature/signature.rb', line 7
def name
@name
end
|
#txt ⇒ Object
Returns the value of attribute txt.
7
8
9
|
# File 'lib/zm/client/signature/signature.rb', line 7
def txt
@txt
end
|
Instance Method Details
#content ⇒ Object
51
52
53
|
# File 'lib/zm/client/signature/signature.rb', line 51
def content
html || txt || ''
end
|
#create! ⇒ Object
9
10
11
12
|
# File 'lib/zm/client/signature/signature.rb', line 9
def create!
rep = @parent.sacc.invoke(jsns_builder.to_jsns)
@id = rep[:CreateSignatureResponse][:signature].first[:id]
end
|
#delete! ⇒ Object
30
31
32
33
34
35
|
# File 'lib/zm/client/signature/signature.rb', line 30
def delete!
return false if @id.nil?
@parent.sacc.invoke(jsns_builder.to_delete)
@id = nil
end
|
#html? ⇒ Boolean
43
44
45
|
# File 'lib/zm/client/signature/signature.rb', line 43
def html?
type == ContentType::HTML
end
|
#modify! ⇒ Object
14
15
16
17
|
# File 'lib/zm/client/signature/signature.rb', line 14
def modify!
@parent.sacc.invoke(jsns_builder.to_update)
true
end
|
#rename!(new_name) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/zm/client/signature/signature.rb', line 23
def rename!(new_name)
return if new_name == @name
@parent.sacc.invoke(jsns_builder.to_rename(new_name))
@name = new_name
end
|
#txt? ⇒ Boolean
47
48
49
|
# File 'lib/zm/client/signature/signature.rb', line 47
def txt?
type == ContentType::TEXT
end
|
#update!(*args) ⇒ Object
19
20
21
|
# File 'lib/zm/client/signature/signature.rb', line 19
def update!(*args)
raise NotImplementedError
end
|