Class: Ari::Generators::Attribute
- Inherits:
-
Object
- Object
- Ari::Generators::Attribute
- Defined in:
- lib/ari/generators/attribute.rb
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(specification) ⇒ Attribute
constructor
A new instance of Attribute.
- #location ⇒ Object
- #multiple? ⇒ Boolean
- #name ⇒ Object
- #required? ⇒ Boolean
- #type ⇒ Object
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
#description ⇒ Object
13 14 15 |
# File 'lib/ari/generators/attribute.rb', line 13 def description @specification['description'] end |
#location ⇒ Object
17 18 19 |
# File 'lib/ari/generators/attribute.rb', line 17 def location @specification['paramType'] end |
#multiple? ⇒ Boolean
25 26 27 |
# File 'lib/ari/generators/attribute.rb', line 25 def multiple? @specification['allowMultiple'] end |
#name ⇒ Object
9 10 11 |
# File 'lib/ari/generators/attribute.rb', line 9 def name @specification['name'] end |
#required? ⇒ Boolean
21 22 23 |
# File 'lib/ari/generators/attribute.rb', line 21 def required? @specification['required'] end |
#type ⇒ Object
29 30 31 |
# File 'lib/ari/generators/attribute.rb', line 29 def type @specification['dataType'] end |