Class: ForestLiana::Model::Collection

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Serialization, ActiveModel::Validations
Defined in:
app/models/forest_liana/model/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Collection

Returns a new instance of Collection.



10
11
12
13
14
15
16
17
# File 'app/models/forest_liana/model/collection.rb', line 10

def initialize(attributes = {})
  @actions = []
  @is_searchable = true

  attributes.each do |name, value|
    send("#{name}=", value)
  end
end

Instance Attribute Details

#actionsObject

Returns the value of attribute actions.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def actions
  @actions
end

#fieldsObject

Returns the value of attribute fields.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def fields
  @fields
end

#is_read_onlyObject

Returns the value of attribute is_read_only.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def is_read_only
  @is_read_only
end

#is_searchableObject

Returns the value of attribute is_searchable.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def is_searchable
  @is_searchable
end

#is_virtualObject

Returns the value of attribute is_virtual.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def is_virtual
  @is_virtual
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def name
  @name
end

#only_for_relationshipsObject

Returns the value of attribute only_for_relationships.



7
8
9
# File 'app/models/forest_liana/model/collection.rb', line 7

def only_for_relationships
  @only_for_relationships
end

Instance Method Details

#idObject



23
24
25
# File 'app/models/forest_liana/model/collection.rb', line 23

def id
  name
end

#persisted?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/models/forest_liana/model/collection.rb', line 19

def persisted?
  false
end