Class: ModelX::Base
Overview
Base ModelX class. Does nothing more than include Mixin and define a constructor.
Instance Method Summary collapse
-
#initialize(attributes = {}) {|self| ... } ⇒ Base
constructor
Initializes the ModelX class by assigning all specified attributes.
Methods included from Mixin
Methods included from Boolean
Methods included from Attributes
#[], #assign_attributes, #attributes, #attributes=
Constructor Details
#initialize(attributes = {}) {|self| ... } ⇒ Base
Initializes the ModelX class by assigning all specified attributes.
12 13 14 15 |
# File 'lib/model_x/base.rb', line 12 def initialize(attributes = {}) self.attributes = attributes if attributes.present? yield self if block_given? end |