Class: Jrmvnrunner::Dsl
- Inherits:
-
Object
- Object
- Jrmvnrunner::Dsl
- Defined in:
- lib/jrmvnrunner/dsl.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#gem ⇒ Object
readonly
Returns the value of attribute gem.
-
#pom ⇒ Object
readonly
Returns the value of attribute pom.
-
#project_info ⇒ Object
readonly
Returns the value of attribute project_info.
Instance Method Summary collapse
- #Gemfile(code = nil, &block) ⇒ Object
-
#initialize ⇒ Dsl
constructor
A new instance of Dsl.
- #Pomfile(code = nil, &block) ⇒ Object
- #project(path) ⇒ Object
Constructor Details
Instance Attribute Details
#gem ⇒ Object (readonly)
Returns the value of attribute gem.
47 48 49 |
# File 'lib/jrmvnrunner/dsl.rb', line 47 def gem @gem end |
#pom ⇒ Object (readonly)
Returns the value of attribute pom.
46 47 48 |
# File 'lib/jrmvnrunner/dsl.rb', line 46 def pom @pom end |
#project_info ⇒ Object (readonly)
Returns the value of attribute project_info.
48 49 50 |
# File 'lib/jrmvnrunner/dsl.rb', line 48 def project_info @project_info end |
Instance Method Details
#Gemfile(code = nil, &block) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/jrmvnrunner/dsl.rb', line 66 def Gemfile(code=nil, &block) if code @gem.source=code else @gem.source=block.to_ruby if block_given? end end |
#Pomfile(code = nil, &block) ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/jrmvnrunner/dsl.rb', line 56 def Pomfile(code=nil, &block) if code @pom.instance_exec do eval(code) end else @pom.instance_exec(&block) if block_given? end end |
#project(path) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/jrmvnrunner/dsl.rb', line 74 def project(path) path = path.split(':') @project_info.merge!( :group_id => path[0], :name => path[1], :version => path[2] ) end |