Class: Ros::Package

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Package

Returns a new instance of Package.



21
22
23
# File 'lib/ros/ros.rb', line 21

def initialize name
  @name = name
end

Instance Attribute Details

#appliedObject

Returns the value of attribute applied.



19
20
21
# File 'lib/ros/ros.rb', line 19

def applied
  @applied
end

#applyObject

Returns the value of attribute apply.



19
20
21
# File 'lib/ros/ros.rb', line 19

def apply
  @apply
end

#nameObject

Returns the value of attribute name.



19
20
21
# File 'lib/ros/ros.rb', line 19

def name
  @name
end

Instance Method Details

#apply_to(box) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/ros/ros.rb', line 30

def apply_to box
  unless applied and applied.call(box)
    print "applying '#{name}' to '#{box.options[:host]}'\n"
    apply.call box
    print "done\n"
  end
end

#configure_with(&b) ⇒ Object



25
26
27
28
# File 'lib/ros/ros.rb', line 25

def configure_with &b
  dsl = Dsl.new self
  dsl.instance_eval &b
end