Class: Doubleshot::Configuration::SourceLocations
- Defined in:
- lib/doubleshot/configuration/source_locations.rb
Instance Attribute Summary collapse
-
#java ⇒ Object
Returns the value of attribute java.
-
#ruby ⇒ Object
Returns the value of attribute ruby.
-
#tests ⇒ Object
Returns the value of attribute tests.
Instance Method Summary collapse
- #__changes__ ⇒ Object
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize ⇒ SourceLocations
constructor
A new instance of SourceLocations.
Constructor Details
#initialize ⇒ SourceLocations
Returns a new instance of SourceLocations.
5 6 7 8 9 10 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 5 def initialize @defaults = {} @ruby = default :ruby, Pathname("lib") @java = default :java, Pathname("ext/java") @tests = default :tests, Pathname("test") end |
Instance Attribute Details
#java ⇒ Object
Returns the value of attribute java.
17 18 19 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 17 def java @java end |
#ruby ⇒ Object
Returns the value of attribute ruby.
12 13 14 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 12 def ruby @ruby end |
#tests ⇒ Object
Returns the value of attribute tests.
22 23 24 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 22 def tests @tests end |
Instance Method Details
#__changes__ ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 35 def __changes__ changes = [] @defaults.each_pair do |key,value| changes << key unless instance_variable_get("@#{key}") == value end changes end |
#eql?(other) ⇒ Boolean Also known as: ==
27 28 29 30 31 32 |
# File 'lib/doubleshot/configuration/source_locations.rb', line 27 def eql?(other) other.is_a?(self.class) && other.ruby == ruby && other.java == java && other.tests == tests end |