Class: Duse::Client::Folder
Constant Summary
collapse
- FOLDER_SYMBOL =
'📂'
Constants inherited
from Entity
Entity::MAP
Instance Attribute Summary
Attributes inherited from Entity
#attributes, #curry
Instance Method Summary
collapse
Methods inherited from Entity
add_attribute, attributes, base_path, #delete, id_field, ignore_in_json, #initialize, #load_attribute, many, #missing?, one, #reload, #save, #set_attribute, subclasses, #to_h
Instance Method Details
#children ⇒ Object
20
21
22
|
# File 'lib/duse/client/folder.rb', line 20
def children
self.subfolders + self.secrets
end
|
#id_name ⇒ Object
24
25
26
27
|
# File 'lib/duse/client/folder.rb', line 24
def id_name
return "#{FOLDER_SYMBOL} #{self.name}" if self.id.nil?
"#{FOLDER_SYMBOL} #{self.id}: #{self.name}"
end
|
#to_s ⇒ Object
29
30
31
|
# File 'lib/duse/client/folder.rb', line 29
def to_s
"#{FOLDER_SYMBOL} #{self.name}"
end
|