Class: LucidWorks::DatasourceProperty
- Inherits:
-
Object
- Object
- LucidWorks::DatasourceProperty
- Defined in:
- lib/lucid_works/datasource_property.rb
Instance Attribute Summary collapse
-
#advanced ⇒ Object
(also: #advanced?)
readonly
Returns the value of attribute advanced.
-
#allowed_values ⇒ Object
readonly
Returns the value of attribute allowed_values.
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#read_only ⇒ Object
(also: #read_only?)
readonly
Returns the value of attribute read_only.
-
#required ⇒ Object
(also: #required?)
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DatasourceProperty
constructor
A new instance of DatasourceProperty.
Constructor Details
#initialize(attributes = {}) ⇒ DatasourceProperty
Returns a new instance of DatasourceProperty.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lucid_works/datasource_property.rb', line 10 def initialize(attributes = {}) @description = attributes['description'] @name = attributes['name'] @allowed_values = attributes['allowed_values'] @type = attributes['type'] @default_value = attributes['default_value'] @required = attributes['required'] @read_only = attributes['read_only'] @advanced = attributes['hints'].include? 'advanced' rescue false end |
Instance Attribute Details
#advanced ⇒ Object (readonly) Also known as: advanced?
Returns the value of attribute advanced.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def advanced @advanced end |
#allowed_values ⇒ Object (readonly)
Returns the value of attribute allowed_values.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def allowed_values @allowed_values end |
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def default_value @default_value end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def name @name end |
#read_only ⇒ Object (readonly) Also known as: read_only?
Returns the value of attribute read_only.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def read_only @read_only end |
#required ⇒ Object (readonly) Also known as: required?
Returns the value of attribute required.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/lucid_works/datasource_property.rb', line 5 def type @type end |