Class: Vixen::Model::Snapshot
- Inherits:
-
Base
- Object
- Base
- Vixen::Model::Snapshot
show all
- Defined in:
- lib/vixen/model/snapshot.rb
Instance Attribute Summary
Attributes inherited from Base
#handle
Instance Method Summary
collapse
Methods inherited from Base
finalize, #get_string_property, #initialize
Instance Method Details
#all_children ⇒ Object
29
30
31
32
|
# File 'lib/vixen/model/snapshot.rb', line 29
def all_children
childs = children
(childs + childs.map {|child| child.all_children}).flatten
end
|
#description ⇒ Object
9
10
11
12
|
# File 'lib/vixen/model/snapshot.rb', line 9
def description
return @description unless @description.nil?
@description = get_string_property Vixen::Constants::VixPropertyId[:snapshot_description]
end
|
#display_name ⇒ Object
4
5
6
7
|
# File 'lib/vixen/model/snapshot.rb', line 4
def display_name
return @display_name unless @display_name.nil?
@display_name = get_string_property Vixen::Constants::VixPropertyId[:snapshot_displayname]
end
|
#full_name ⇒ Object
20
21
22
23
|
# File 'lib/vixen/model/snapshot.rb', line 20
def full_name
root = parent ? parent.full_name : File::SEPARATOR
File.join(root, display_name)
end
|
#parent ⇒ Object
14
15
16
17
18
|
# File 'lib/vixen/model/snapshot.rb', line 14
def parent
return @parent unless @parent.nil?
parent_handle = Vixen::Bridge.get_parent handle
@parent = parent_handle == Vixen::Constants::VixHandle[:invalid] ? nil : self.class.new(parent_handle)
end
|
#to_s ⇒ Object
34
35
36
|
# File 'lib/vixen/model/snapshot.rb', line 34
def to_s
display_name
end
|