Class: Slicecraft::Syncer
- Inherits:
-
Object
- Object
- Slicecraft::Syncer
- Defined in:
- lib/slicecraft.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
- #build_path ⇒ Object
- #hashed_path ⇒ Object
-
#initialize(options) ⇒ Syncer
constructor
A new instance of Syncer.
- #project_name ⇒ Object
- #result_url ⇒ Object
Constructor Details
#initialize(options) ⇒ Syncer
Returns a new instance of Syncer.
31 32 33 |
# File 'lib/slicecraft.rb', line 31 def initialize() @path = [:directory] end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
28 29 30 |
# File 'lib/slicecraft.rb', line 28 def path @path end |
#settings ⇒ Object
Returns the value of attribute settings.
29 30 31 |
# File 'lib/slicecraft.rb', line 29 def settings @settings end |
Instance Method Details
#build_path ⇒ Object
47 48 49 |
# File 'lib/slicecraft.rb', line 47 def build_path "#{@path}/build/" end |
#hashed_path ⇒ Object
35 36 37 |
# File 'lib/slicecraft.rb', line 35 def hashed_path "#{project_name}_#{Digest::SHA1.hexdigest('12RThh' + project_name)}" end |
#project_name ⇒ Object
43 44 45 |
# File 'lib/slicecraft.rb', line 43 def project_name @path.split('/').last end |
#result_url ⇒ Object
39 40 41 |
# File 'lib/slicecraft.rb', line 39 def result_url "#{settings['result_url']}/#{hashed_path}" end |