Class: Screenpress::Config
- Inherits:
-
Object
- Object
- Screenpress::Config
- Defined in:
- lib/screenpress/config.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #full_path ⇒ Object
- #full_path=(val) ⇒ Object
- #full_tmp_path ⇒ Object
- #full_tmp_path=(val) ⇒ Object
- #path=(val) ⇒ Object
- #threshold ⇒ Object
- #threshold=(val) ⇒ Object
- #tmp_path=(val) ⇒ Object
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
3 4 5 |
# File 'lib/screenpress/config.rb', line 3 def enabled @enabled end |
Instance Method Details
#enabled? ⇒ Boolean
31 32 33 34 |
# File 'lib/screenpress/config.rb', line 31 def enabled? return !!@calc_enabled if defined?(@calc_enabled) @calc_enabled = calc_enabled end |
#full_path ⇒ Object
13 14 15 16 |
# File 'lib/screenpress/config.rb', line 13 def full_path self.path = "screenpress" unless @full_path @full_path end |
#full_path=(val) ⇒ Object
9 10 11 |
# File 'lib/screenpress/config.rb', line 9 def full_path=val @full_path = Pathname.new(val). end |
#full_tmp_path ⇒ Object
26 27 28 29 |
# File 'lib/screenpress/config.rb', line 26 def full_tmp_path self.tmp_path = "tmp" unless @full_tmp_path @full_tmp_path end |
#full_tmp_path=(val) ⇒ Object
22 23 24 |
# File 'lib/screenpress/config.rb', line 22 def full_tmp_path=val @full_tmp_path = Pathname.new(val). end |
#path=(val) ⇒ Object
5 6 7 |
# File 'lib/screenpress/config.rb', line 5 def path=val self.full_path = root.join(val) end |
#threshold ⇒ Object
41 42 43 |
# File 'lib/screenpress/config.rb', line 41 def threshold @threshold ||= 0.1 end |
#threshold=(val) ⇒ Object
36 37 38 39 |
# File 'lib/screenpress/config.rb', line 36 def threshold=val # number between 0.0 and 100.0 for percentage of image that can change @threshold = val.to_f end |
#tmp_path=(val) ⇒ Object
18 19 20 |
# File 'lib/screenpress/config.rb', line 18 def tmp_path=val self.full_tmp_path=root.join(val) end |