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) ⇒ Attribute

Returns a new instance of Attribute.



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

def initialize(name, type)
  @name = name
  @type = type
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

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end