Class: Doubleshot::Configuration::SourceLocations

Inherits:
Object
  • Object
show all
Defined in:
lib/doubleshot/configuration/source_locations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSourceLocations

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

#javaObject

Returns the value of attribute java.



17
18
19
# File 'lib/doubleshot/configuration/source_locations.rb', line 17

def java
  @java
end

#rubyObject

Returns the value of attribute ruby.



12
13
14
# File 'lib/doubleshot/configuration/source_locations.rb', line 12

def ruby
  @ruby
end

#testsObject

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: ==

Returns:

  • (Boolean)


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