Class: Ari::Generators::Attribute

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

Instance Method Summary collapse

Constructor Details

#initialize(specification) ⇒ Attribute

Returns a new instance of Attribute.



5
6
7
# File 'lib/ari/generators/attribute.rb', line 5

def initialize(specification)
  @specification = specification
end

Instance Method Details

#descriptionObject



13
14
15
# File 'lib/ari/generators/attribute.rb', line 13

def description
  @specification['description']
end

#locationObject



17
18
19
# File 'lib/ari/generators/attribute.rb', line 17

def location
  @specification['paramType']
end

#multiple?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/ari/generators/attribute.rb', line 25

def multiple?
  @specification['allowMultiple']
end

#nameObject



9
10
11
# File 'lib/ari/generators/attribute.rb', line 9

def name
  @specification['name']
end

#required?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ari/generators/attribute.rb', line 21

def required?
  @specification['required']
end

#typeObject



29
30
31
# File 'lib/ari/generators/attribute.rb', line 29

def type
  @specification['dataType']
end