Class: EacRubyUtils::CommonConstructor::Initialize

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_ruby_utils/common_constructor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(common_constructor, args, object) ⇒ Initialize

Returns a new instance of Initialize.



95
96
97
98
99
# File 'lib/eac_ruby_utils/common_constructor.rb', line 95

def initialize(common_constructor, args, object)
  @common_constructor = common_constructor
  @args = args
  @object = object
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



93
94
95
# File 'lib/eac_ruby_utils/common_constructor.rb', line 93

def args
  @args
end

#common_constructorObject (readonly)

Returns the value of attribute common_constructor.



93
94
95
# File 'lib/eac_ruby_utils/common_constructor.rb', line 93

def common_constructor
  @common_constructor
end

#objectObject (readonly)

Returns the value of attribute object.



93
94
95
# File 'lib/eac_ruby_utils/common_constructor.rb', line 93

def object
  @object
end

Instance Method Details

#runObject



101
102
103
104
105
106
107
# File 'lib/eac_ruby_utils/common_constructor.rb', line 101

def run
  validate_args_count
  object.run_callbacks :initialize do
    object_attributes_set
    object_after_callback
  end
end