Class: Lbrt::Space
Defined Under Namespace
Instance Method Summary collapse
- #apply(file) ⇒ Object
- #export(export_options = {}) ⇒ Object
-
#initialize(client, options = {}) ⇒ Space
constructor
A new instance of Space.
- #list ⇒ Object
- #peco ⇒ Object
Methods included from Logger::Helper
Constructor Details
Instance Method Details
#apply(file) ⇒ Object
39 40 41 |
# File 'lib/lbrt/space.rb', line 39 def apply(file) walk(file) end |
#export(export_options = {}) ⇒ Object
34 35 36 37 |
# File 'lib/lbrt/space.rb', line 34 def export( = {}) exported = Lbrt::Space::Exporter.export(@client, @options) Lbrt::Space::DSL.convert(exported, @options) end |
#list ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/lbrt/space.rb', line 10 def list json = {} space_by_name_or_id = build_space_by_name_or_id space_by_name_or_id.each do |name_or_id, space_id| json[space_id] = { name: name_or_id, url: space_url(space_id), } end puts JSON.pretty_generate(json) end |