Class: Spock::Config
- Inherits:
-
Object
- Object
- Spock::Config
- Defined in:
- lib/spock.rb
Instance Attribute Summary collapse
-
#sources ⇒ Object
readonly
Returns the value of attribute sources.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#target_prefix ⇒ Object
readonly
Returns the value of attribute target_prefix.
Instance Method Summary collapse
- #from(str) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to(str) ⇒ Object
- #to_prefix(str) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
78 |
# File 'lib/spock.rb', line 78 def initialize; @sources = []; @target = nil; @target_prefix = ''; end |
Instance Attribute Details
#sources ⇒ Object (readonly)
Returns the value of attribute sources.
77 78 79 |
# File 'lib/spock.rb', line 77 def sources @sources end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
77 78 79 |
# File 'lib/spock.rb', line 77 def target @target end |
#target_prefix ⇒ Object (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.(str); end |
#to(str) ⇒ Object
81 |
# File 'lib/spock.rb', line 81 def to(str); @target = File.(str); end |
#to_prefix(str) ⇒ Object
82 |
# File 'lib/spock.rb', line 82 def to_prefix(str); @target_prefix = str; end |