Class: Space::Models::Project::Bundler
- Inherits:
-
Object
- Object
- Space::Models::Project::Bundler
- Defined in:
- lib/space/models/project/bundler.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Attributes included from Events
Attributes included from Shell
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(project) ⇒ Bundler
constructor
A new instance of Bundler.
Methods included from Events
#buffering, #buffering?, #notify, #observers, #subscribe
Methods included from Shell
all, #commands, included, refresh, #refresh, #result
Methods included from Shell::Watcher
Constructor Details
#initialize(project) ⇒ Bundler
Returns a new instance of Bundler.
15 16 17 18 |
# File 'lib/space/models/project/bundler.rb', line 15 def initialize(project) @project = project super() end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
13 14 15 |
# File 'lib/space/models/project/bundler.rb', line 13 def project @project end |
Instance Method Details
#config ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/space/models/project/bundler.rb', line 20 def config lines = result(:config).split("\n")[2..-1] || [] values = lines.map_slice(3) do |name, value, _| [name, value =~ /: "(.*)"/ && $1] end Hash[*values.compact.flatten] end |