Class: Schema::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/schema/schema/attribute.rb

Defined Under Namespace

Classes: Error, TypeError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, strict) ⇒ Attribute

Returns a new instance of Attribute.



10
11
12
13
14
# File 'lib/schema/schema/attribute.rb', line 10

def initialize(name, type, strict)
  @name = name
  @type = type
  @strict = strict
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/schema/schema/attribute.rb', line 6

def name
  @name
end

#strictObject (readonly)

Returns the value of attribute strict.



8
9
10
# File 'lib/schema/schema/attribute.rb', line 8

def strict
  @strict
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/schema/schema/attribute.rb', line 7

def type
  @type
end