class Jasonette::Properties::PropertyEnum

Attributes

properties[RW]

Public Class Methods

new(properties = {}) click to toggle source
# File lib/jasonette/core/properties.rb, line 9
def initialize properties = {}
  @properties = properties
end

Public Instance Methods

has_type?(name, ptype) click to toggle source
# File lib/jasonette/core/properties.rb, line 21
def has_type?(name, ptype)
  value[name.to_sym][ptype.to_sym] rescue false
end
merge!(value) click to toggle source
# File lib/jasonette/core/properties.rb, line 13
def merge! value
  properties.merge! value if value.is_a? Hash
  properties.merge! value.properties if value.is_a? self.class
end
names() click to toggle source
# File lib/jasonette/core/properties.rb, line 18
def names; properties.keys end
value() click to toggle source
# File lib/jasonette/core/properties.rb, line 19
def value; properties end