Class: SiteTarget
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- SiteTarget
- Defined in:
- lib/domain/site_target/model.rb
Instance Attribute Summary collapse
-
#included ⇒ Object
Returns the value of attribute included.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#site_id ⇒ Object
Returns the value of attribute site_id.
-
#target ⇒ Object
Returns the value of attribute target.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SiteTarget
constructor
A new instance of SiteTarget.
Methods inherited from Domain::Model
columns, from_csv, from_json, headers, #to_csv, #to_hash, #to_s, view
Constructor Details
#initialize(attributes = {}) ⇒ SiteTarget
12 13 14 15 |
# File 'lib/domain/site_target/model.rb', line 12 def initialize(attributes = {}) attributes[:type] = determine_target_type(attributes[:target]) if attributes[:type].nil? && attributes[:target] super(attributes) end |
Instance Attribute Details
#included ⇒ Object
Returns the value of attribute included.
6 7 8 |
# File 'lib/domain/site_target/model.rb', line 6 def included @included end |
#scope ⇒ Object
Returns the value of attribute scope.
6 7 8 |
# File 'lib/domain/site_target/model.rb', line 6 def scope @scope end |
#site_id ⇒ Object
Returns the value of attribute site_id.
6 7 8 |
# File 'lib/domain/site_target/model.rb', line 6 def site_id @site_id end |
#target ⇒ Object
Returns the value of attribute target.
6 7 8 |
# File 'lib/domain/site_target/model.rb', line 6 def target @target end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/domain/site_target/model.rb', line 6 def type @type end |
Class Method Details
.primary_key ⇒ Object
17 18 19 |
# File 'lib/domain/site_target/model.rb', line 17 def self.primary_key %w[site_id target type included scope] end |
.table_name ⇒ Object
21 22 23 |
# File 'lib/domain/site_target/model.rb', line 21 def self.table_name 'site_target' end |