Class: Spock::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



78
# File 'lib/spock.rb', line 78

def initialize; @sources = []; @target = nil; @target_prefix = ''; end

Instance Attribute Details

#sourcesObject (readonly)

Returns the value of attribute sources.



77
78
79
# File 'lib/spock.rb', line 77

def sources
  @sources
end

#targetObject (readonly)

Returns the value of attribute target.



77
78
79
# File 'lib/spock.rb', line 77

def target
  @target
end

#target_prefixObject (readonly)

Returns the value of attribute target_prefix.



77
78
79
# File 'lib/spock.rb', line 77

def target_prefix
  @target_prefix
end

Instance Method Details

#from(str) ⇒ Object



80
# File 'lib/spock.rb', line 80

def from(str); @sources << File.expand_path(str); end

#to(str) ⇒ Object



81
# File 'lib/spock.rb', line 81

def to(str); @target = File.expand_path(str); end

#to_prefix(str) ⇒ Object



82
# File 'lib/spock.rb', line 82

def to_prefix(str); @target_prefix = str; end