Skip to content

Latest commit

 

History

History
206 lines (83 loc) · 2.32 KB

DeclaredProperty.rst

File metadata and controls

206 lines (83 loc) · 2.32 KB

DeclaredProperty

Contains methods related to the management

DeclaredProperty/IllegalPropertyError

Constants

  • ILLEGAL_PROPS

Files

Methods

#default_value

ruby

def default_value

options[:default]

end

#initialize

ruby

def initialize(name, options = {})

fail IllegalPropertyError, "#{name} is an illegal property" if ILLEGAL_PROPS.include?(name.to_s) @name = @name_sym = name @name_string = name.to_s @options = options

end

#magic_typecaster

Returns the value of attribute magic_typecaster

ruby

def magic_typecaster

@magic_typecaster

end

#name

Returns the value of attribute name

ruby

def name

@name

end

#name_string

Returns the value of attribute name_string

ruby

def name_string

@name_string

end

#name_sym

Returns the value of attribute name_sym

ruby

def name_sym

@name_sym

end

#options

Returns the value of attribute options

ruby

def options

@options

end

#register

ruby

def register

register_magic_properties

end

#type

ruby

def type

options[:type]

end

#typecaster

ruby

def typecaster

options[:typecaster]

end