Class: Screenpress::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/screenpress/config.rb', line 3

def enabled
  @enabled
end

Instance Method Details

#comparatorObject



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

Returns:

  • (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_pathObject



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).expand_path
end

#full_tmp_pathObject



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).expand_path
end

#path=(val) ⇒ Object



5
6
7
# File 'lib/screenpress/config.rb', line 5

def path=val
  self.full_path = root.join(val)
end

#thresholdObject



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