Class: Muxilla::Mux

Inherits:
Object
  • Object
show all
Defined in:
lib/muxilla/mux.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nickname, options) ⇒ Mux

Returns a new instance of Mux.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/muxilla/mux.rb', line 4

def initialize nickname, options
  @nickname = nickname
  @type = options[:type]
  @update = options[:update]
  @id = options[:id]
  @code = @rails = @resque = []
  if options[:apps]
    @code = options[:apps]['code'].split ',' if options[:apps]['code']
    @rails = options[:apps]['rails'].split ',' if options[:apps]['rails']
    @resque = options[:apps]['resque'].split ',' if options[:apps]['resque']
  end
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def code
  @code
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def id
  @id
end

#nicknameObject

Returns the value of attribute nickname.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def nickname
  @nickname
end

#railsObject

Returns the value of attribute rails.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def rails
  @rails
end

#resqueObject

Returns the value of attribute resque.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def resque
  @resque
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def type
  @type
end

#updateObject

Returns the value of attribute update.



3
4
5
# File 'lib/muxilla/mux.rb', line 3

def update
  @update
end

Instance Method Details

#appsObject



17
18
19
20
# File 'lib/muxilla/mux.rb', line 17

def apps
  # delete this once the call has been removed from the template
  @code
end

#dev_rootObject



22
23
24
# File 'lib/muxilla/mux.rb', line 22

def dev_root
  "~/dev"
end