strict_machine 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e80bf81c2327da9903a2be8ec2f83cc8e10b8e44
4
- data.tar.gz: 4be3c1652532a57bf79b09036dc99a55958b4121
3
+ metadata.gz: 48aad5eee2035ada99639e8d22fb9a9b645265ab
4
+ data.tar.gz: 046951bb787ff94635ac330fe1efa1dd685bd004
5
5
  SHA512:
6
- metadata.gz: e9f2e943526578b4dc12537392501b74e04cfb8c9ef041c04c59e8ddfdaa80808f67605e87adaf8f5acfecf76877ba4bd3f4bcf67ca88de6ee0287969907eb43
7
- data.tar.gz: 3bcc12ee4ee03e665f74fcc389525eef5852ccc8d89a6ce2a4d0f34659b297bf9a8fc297261d98fbdde0065f2f09e5caeedb194795c26761e5189d7fbb5771df
6
+ metadata.gz: b2aff1a943f0bcac84d004b34bc69595a4c58335b8c350c742f7a465384ca4c2187f52e34fbe8361c4d992f43ba2064b4de7987f2823d638386d0a27b3ec9d44
7
+ data.tar.gz: 40a0b5d492bf3b3e5b2d7ddca72d57e3c319d6af341e3c0b1c4381fd29bcfd0e3ea6bd890ade2cb4dbc7f56e6e794b7d990312a54c5986c5804ff40c0e3f90d6
@@ -2,16 +2,18 @@ module StrictMachine
2
2
  module MountStateMachine
3
3
  module Initializer
4
4
  def initialize
5
- @state_machine = self.class.strict_machine_class.new
6
- @state_machine.mounted_on = self
5
+ if self.class.respond_to?(:strict_machine_class)
6
+ @state_machine = self.class.strict_machine_class.new
7
+ @state_machine.mounted_on = self
7
8
 
8
- options = self.class.strict_machine_options
9
- state_attr = options.fetch(:state, :status)
10
- @state_machine.state_attr = state_attr
9
+ options = self.class.strict_machine_options
10
+ state_attr = options.fetch(:state, :status)
11
+ @state_machine.state_attr = state_attr
11
12
 
12
- @state_machine.boot!
13
+ @state_machine.boot!
13
14
 
14
- super
15
+ super
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -1,7 +1,7 @@
1
1
  require_relative "ext/object"
2
2
 
3
3
  module StrictMachine
4
- VERSION = "0.1.0".freeze
4
+ VERSION = "0.1.1".freeze
5
5
 
6
6
  class << self; attr_accessor :list; end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strict_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Antunes