Class: Appraisal::Conditional
- Inherits:
-
BundlerDSL
- Object
- BundlerDSL
- Appraisal::Conditional
- Defined in:
- lib/appraisal/conditional.rb
Constant Summary
Constants inherited from BundlerDSL
Instance Attribute Summary
Attributes inherited from BundlerDSL
Instance Method Summary collapse
-
#for_dup ⇒ Object
:nodoc:.
-
#initialize(condition) ⇒ Conditional
constructor
A new instance of Conditional.
- #to_s ⇒ Object
Methods inherited from BundlerDSL
#gem, #gemspec, #git, #git_source, #group, #install_if, #path, #platforms, #remove_gem, #ruby, #run, #source
Constructor Details
#initialize(condition) ⇒ Conditional
Returns a new instance of Conditional.
8 9 10 11 |
# File 'lib/appraisal/conditional.rb', line 8 def initialize(condition) super() @condition = condition end |
Instance Method Details
#for_dup ⇒ Object
:nodoc:
18 19 20 21 22 |
# File 'lib/appraisal/conditional.rb', line 18 def for_dup return unless @condition.is_a?(String) "install_if #{@condition} do\n#{indent(super)}\nend" end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/appraisal/conditional.rb', line 13 def to_s "install_if #{@condition} do\n#{indent(super)}\nend" end |