class Rasti::Model::Attribute
Attributes
name[R]
options[R]
type[R]
Public Class Methods
new(name, type, options={})
click to toggle source
# File lib/rasti/model/attribute.rb, line 7 def initialize(name, type, options={}) @name = name @type = type @options = options end
Public Instance Methods
default?()
click to toggle source
# File lib/rasti/model/attribute.rb, line 13 def default? options.key? :default end
default_value()
click to toggle source
# File lib/rasti/model/attribute.rb, line 17 def default_value options.fetch(:default) end
to_s()
click to toggle source
# File lib/rasti/model/attribute.rb, line 21 def to_s "#{self.class}[name: #{name.inspect}, type: #{type.inspect}, options: #{options.inspect}]" end
Also aliased as: inspect