Class: Para::ModelFieldParsers::Base
- Inherits:
-
Object
- Object
- Para::ModelFieldParsers::Base
- Defined in:
- lib/para/model_field_parsers/base.rb
Instance Attribute Summary collapse
-
#fields_hash ⇒ Object
readonly
Returns the value of attribute fields_hash.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Class Method Summary collapse
Instance Method Summary collapse
- #applicable? ⇒ Boolean
-
#initialize(model, fields_hash) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(model, fields_hash) ⇒ Base
Returns a new instance of Base.
10 11 12 13 |
# File 'lib/para/model_field_parsers/base.rb', line 10 def initialize(model, fields_hash) @model = model @fields_hash = fields_hash end |
Instance Attribute Details
#fields_hash ⇒ Object (readonly)
Returns the value of attribute fields_hash.
8 9 10 |
# File 'lib/para/model_field_parsers/base.rb', line 8 def fields_hash @fields_hash end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
8 9 10 |
# File 'lib/para/model_field_parsers/base.rb', line 8 def model @model end |
Class Method Details
.register(key, parser) ⇒ Object
4 5 6 |
# File 'lib/para/model_field_parsers/base.rb', line 4 def self.register(key, parser) ModelFieldParsers.registered_parsers[key] = parser end |
Instance Method Details
#applicable? ⇒ Boolean
15 16 17 |
# File 'lib/para/model_field_parsers/base.rb', line 15 def applicable? true end |