Class: Arborist::Migration::ModelArguments
- Inherits:
-
Object
- Object
- Arborist::Migration::ModelArguments
- Defined in:
- lib/arborist/migration/model_arguments.rb
Instance Attribute Summary collapse
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#model_ref ⇒ Object
readonly
Returns the value of attribute model_ref.
Instance Method Summary collapse
-
#initialize(args) ⇒ ModelArguments
constructor
A new instance of ModelArguments.
Constructor Details
#initialize(args) ⇒ ModelArguments
Returns a new instance of ModelArguments.
4 5 6 7 8 9 |
# File 'lib/arborist/migration/model_arguments.rb', line 4 def initialize args = args. @model_ref = args.first || () @method_name = .fetch :as, config.default_method_name end |
Instance Attribute Details
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
2 3 4 |
# File 'lib/arborist/migration/model_arguments.rb', line 2 def method_name @method_name end |
#model_ref ⇒ Object (readonly)
Returns the value of attribute model_ref.
2 3 4 |
# File 'lib/arborist/migration/model_arguments.rb', line 2 def model_ref @model_ref end |