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
-
.config_location ⇒ Object
Returns the value of attribute config_location.
-
.default_crop_params ⇒ Object
Returns the value of attribute default_crop_params.
-
.device_name ⇒ Object
Returns the value of attribute device_name.
-
.diff_screens ⇒ Object
Returns the value of attribute diff_screens.
-
.directory ⇒ Object
Returns the value of attribute directory.
-
.embed_screenshot ⇒ Object
Returns the value of attribute embed_screenshot.
-
.fuzz ⇒ Object
Returns the value of attribute fuzz.
-
.image_location ⇒ Object
Returns the value of attribute image_location.
-
.image_relative_dir ⇒ Object
Returns the value of attribute image_relative_dir.
-
.platform ⇒ Object
Returns the value of attribute platform.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .create_image_dir(image_relative_dir) ⇒ Object
- .current_platform ⇒ Object
- .load_config ⇒ Object
- .set(relative_location) ⇒ Object
Class Attribute Details
.config_location ⇒ Object
Returns the value of attribute config_location.
15 16 17 |
# File 'lib/nakal.rb', line 15 def config_location @config_location end |
.default_crop_params ⇒ Object
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_name ⇒ Object
Returns the value of attribute device_name.
14 15 16 |
# File 'lib/nakal.rb', line 14 def device_name @device_name end |
.diff_screens ⇒ Object
Returns the value of attribute diff_screens.
15 16 17 |
# File 'lib/nakal.rb', line 15 def diff_screens @diff_screens end |
.directory ⇒ Object
Returns the value of attribute directory.
14 15 16 |
# File 'lib/nakal.rb', line 14 def directory @directory end |
.embed_screenshot ⇒ Object
Returns the value of attribute embed_screenshot.
15 16 17 |
# File 'lib/nakal.rb', line 15 def @embed_screenshot end |
.fuzz ⇒ Object
Returns the value of attribute fuzz.
15 16 17 |
# File 'lib/nakal.rb', line 15 def fuzz @fuzz end |
.image_location ⇒ Object
Returns the value of attribute image_location.
14 15 16 |
# File 'lib/nakal.rb', line 14 def image_location @image_location end |
.image_relative_dir ⇒ Object
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 |
.platform ⇒ Object
Returns the value of attribute platform.
14 15 16 |
# File 'lib/nakal.rb', line 14 def platform @platform end |
.timeout ⇒ Object
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
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_platform ⇒ Object
36 37 38 |
# File 'lib/nakal.rb', line 36 def current_platform Nakal.const_get Nakal.platform.capitalize end |
.load_config ⇒ Object
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 |