Class: OptionsModel::Base
Class Method Summary
collapse
Instance Method Summary
collapse
#[], #[]=, #fetch, #initialize, #initialize_dup, #update_attributes
#to_h, #to_h_with_unused
Class Method Details
.derive(name) ⇒ Object
29
30
31
32
33
34
|
# File 'lib/options_model/base.rb', line 29
def self.derive(name)
Class.new(self) do
include OptionsModel::Concerns::NameHacking
self.name = name
end
end
|
.inspect ⇒ Object
21
22
23
|
# File 'lib/options_model/base.rb', line 21
def self.inspect
"#<#{name}:OptionsModel [#{attribute_names.map(&:inspect).join(', ')}]>"
end
|
Instance Method Details
#inspect ⇒ Object
17
18
19
|
# File 'lib/options_model/base.rb', line 17
def inspect
"#<#{self.class.name}:OptionsModel #{self.to_h}>"
end
|
#persisted? ⇒ Boolean
25
26
27
|
# File 'lib/options_model/base.rb', line 25
def persisted?
true
end
|