Module: Nakal

Defined in:
lib/nakal.rb,
lib/nakal/dsl.rb,
lib/nakal/version.rb,
lib/nakal/ios/screen.rb,
lib/nakal/android/adb.rb,
lib/nakal/base_screen.rb,
lib/nakal/android/screen.rb

Defined Under Namespace

Modules: Android, Common, DSL, Ios

Constant Summary collapse

VERSION =
"1.0.4"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.config_locationObject

Returns the value of attribute config_location.



15
16
17
# File 'lib/nakal.rb', line 15

def config_location
  @config_location
end

.default_crop_paramsObject

Returns the value of attribute default_crop_params.



14
15
16
# File 'lib/nakal.rb', line 14

def default_crop_params
  @default_crop_params
end

.device_nameObject

Returns the value of attribute device_name.



14
15
16
# File 'lib/nakal.rb', line 14

def device_name
  @device_name
end

.diff_screensObject

Returns the value of attribute diff_screens.



15
16
17
# File 'lib/nakal.rb', line 15

def diff_screens
  @diff_screens
end

.directoryObject

Returns the value of attribute directory.



14
15
16
# File 'lib/nakal.rb', line 14

def directory
  @directory
end

.embed_screenshotObject

Returns the value of attribute embed_screenshot.



15
16
17
# File 'lib/nakal.rb', line 15

def embed_screenshot
  @embed_screenshot
end

.fuzzObject

Returns the value of attribute fuzz.



15
16
17
# File 'lib/nakal.rb', line 15

def fuzz
  @fuzz
end

.image_locationObject

Returns the value of attribute image_location.



14
15
16
# File 'lib/nakal.rb', line 14

def image_location
  @image_location
end

.image_relative_dirObject

Returns the value of attribute image_relative_dir.



15
16
17
# File 'lib/nakal.rb', line 15

def image_relative_dir
  @image_relative_dir
end

.platformObject

Returns the value of attribute platform.



14
15
16
# File 'lib/nakal.rb', line 14

def platform
  @platform
end

.timeoutObject

Returns the value of attribute timeout.



15
16
17
# File 'lib/nakal.rb', line 15

def timeout
  @timeout
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Nakal)

    the object that the method was called on



17
18
19
# File 'lib/nakal.rb', line 17

def configure
  yield self
end

.create_image_dir(image_relative_dir) ⇒ Object



21
22
23
24
25
# File 'lib/nakal.rb', line 21

def create_image_dir image_relative_dir
  @image_relative_dir = image_relative_dir
  @image_location = "#{@directory}/#{@device_name}/#{image_relative_dir}"
  FileUtils.mkdir_p @image_location unless File.directory?(@image_location)
end

.current_platformObject



36
37
38
# File 'lib/nakal.rb', line 36

def current_platform
  Nakal.const_get Nakal.platform.capitalize
end

.load_configObject



27
28
29
# File 'lib/nakal.rb', line 27

def load_config
  @default_crop_params ||= YAML.load(File.open Nakal.config_location)
end

.set(relative_location) ⇒ Object



31
32
33
34
# File 'lib/nakal.rb', line 31

def set relative_location
  create_image_dir relative_location
  load_config
end