Class: LucidWorks::DatasourceProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/lucid_works/datasource_property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#advancedObject (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_valuesObject (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_valueObject (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

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/lucid_works/datasource_property.rb', line 5

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/lucid_works/datasource_property.rb', line 5

def name
  @name
end

#read_onlyObject (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

#requiredObject (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

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/lucid_works/datasource_property.rb', line 5

def type
  @type
end