Class: ProjectGroup::SublimeProject
- Inherits:
-
Object
- Object
- ProjectGroup::SublimeProject
- Includes:
- FromHash
- Defined in:
- lib/project_group/sublime_project.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
Returns the value of attribute group.
Instance Method Summary collapse
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group.
4 5 6 |
# File 'lib/project_group/sublime_project.rb', line 4 def group @group end |
Instance Method Details
#as_json ⇒ Object
5 6 7 8 9 10 |
# File 'lib/project_group/sublime_project.rb', line 5 def as_json folders = group.singles.map do |proj| {"path" => proj.path, "name" => proj.name} end {"folders" => folders} end |
#to_json ⇒ Object
11 12 13 |
# File 'lib/project_group/sublime_project.rb', line 11 def to_json as_json.to_json end |
#write! ⇒ Object
19 20 21 |
# File 'lib/project_group/sublime_project.rb', line 19 def write! File.create path, to_json end |