Class: YACCL::Model::PropertyDefinition
- Inherits:
-
Object
- Object
- YACCL::Model::PropertyDefinition
- Defined in:
- lib/yaccl/model/property_definition.rb
Instance Attribute Summary collapse
-
#cardinality ⇒ Object
Returns the value of attribute cardinality.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inherited ⇒ Object
Returns the value of attribute inherited.
-
#local_name ⇒ Object
Returns the value of attribute local_name.
-
#open_choise ⇒ Object
Returns the value of attribute open_choise.
-
#orderable ⇒ Object
Returns the value of attribute orderable.
-
#property_type ⇒ Object
Returns the value of attribute property_type.
-
#query_name ⇒ Object
Returns the value of attribute query_name.
-
#queryable ⇒ Object
Returns the value of attribute queryable.
-
#required ⇒ Object
Returns the value of attribute required.
-
#updatability ⇒ Object
Returns the value of attribute updatability.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ PropertyDefinition
constructor
A new instance of PropertyDefinition.
- #oncreate? ⇒ Boolean
- #readonly? ⇒ Boolean
- #readwrite? ⇒ Boolean
- #to_hash ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ PropertyDefinition
Returns a new instance of PropertyDefinition.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/yaccl/model/property_definition.rb', line 9 def initialize(hash={}) @id = hash[:id] @local_name = hash[:localName] @query_name = hash[:queryName] @inherited = hash[:inherited] @open_choice = hash[:openChoice] @orderable = hash[:orderable] @property_type = hash[:propertyType] @updatability = hash[:updatability] @display_name = hash[:displayName] @required = hash[:required] @cardinality = hash[:cardinality] @queryable = hash[:queryable] end |
Instance Attribute Details
#cardinality ⇒ Object
Returns the value of attribute cardinality.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def cardinality @cardinality end |
#display_name ⇒ Object
Returns the value of attribute display_name.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def id @id end |
#inherited ⇒ Object
Returns the value of attribute inherited.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def inherited @inherited end |
#local_name ⇒ Object
Returns the value of attribute local_name.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def local_name @local_name end |
#open_choise ⇒ Object
Returns the value of attribute open_choise.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def open_choise @open_choise end |
#orderable ⇒ Object
Returns the value of attribute orderable.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def orderable @orderable end |
#property_type ⇒ Object
Returns the value of attribute property_type.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def property_type @property_type end |
#query_name ⇒ Object
Returns the value of attribute query_name.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def query_name @query_name end |
#queryable ⇒ Object
Returns the value of attribute queryable.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def queryable @queryable end |
#required ⇒ Object
Returns the value of attribute required.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def required @required end |
#updatability ⇒ Object
Returns the value of attribute updatability.
5 6 7 |
# File 'lib/yaccl/model/property_definition.rb', line 5 def updatability @updatability end |
Instance Method Details
#oncreate? ⇒ Boolean
28 29 30 |
# File 'lib/yaccl/model/property_definition.rb', line 28 def oncreate? updatability == 'oncreate' end |
#readonly? ⇒ Boolean
24 25 26 |
# File 'lib/yaccl/model/property_definition.rb', line 24 def readonly? updatability == 'readonly' end |
#readwrite? ⇒ Boolean
32 33 34 |
# File 'lib/yaccl/model/property_definition.rb', line 32 def readwrite? updatability == 'readwrite' end |
#to_hash ⇒ Object
36 37 38 |
# File 'lib/yaccl/model/property_definition.rb', line 36 def to_hash # TODO (Needed for updating type?) end |