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
- #comparator ⇒ Object
- #comparator=(val) ⇒ Object
- #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
#comparator ⇒ Object
49 50 51 52 |
# File 'lib/screenpress/config.rb', line 49 def comparator @comparator ||= calc_comparator @comparator end |
#comparator=(val) ⇒ Object
45 46 47 |
# File 'lib/screenpress/config.rb', line 45 def comparator=val @comparator = val end |
#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 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 |