Class: INat::Entity::Project
- Inherits:
-
Data::Entity
- Object
- Data::Model
- Data::Entity
- INat::Entity::Project
- Extended by:
- BySLUG
- Includes:
- Data::Types, INat::Entity
- Defined in:
- lib/inat/data/entity/project.rb,
lib/inat/data/entity/projectadmin.rb,
lib/inat/data/entity/projectobservationrule.rb
Fields collapse
-
#admins ⇒ Array<item_type: ProjectAdmin>
The
admins
field. -
#banner_color ⇒ type: String
TODO: сделать тип.
-
#created_at ⇒ type: Time
The
created_at
field. -
#description ⇒ type: String
The
description
field. -
#excluded_places ⇒ Array<item_type: Place>
The
excluded_places
field. -
#excluded_taxa ⇒ Array<item_type: Taxon>
The
excluded_taxa
field. -
#flags ⇒ Array<item_type: Flag>
The
flags
field. -
#header_image_contain ⇒ type: Boolean
The
header_image_contain
field. -
#header_image_file_name ⇒ type: String
The
header_image_file_name
field. -
#header_image_url ⇒ type: URI
The
header_image_url
field. -
#hide_title ⇒ type: Boolean
The
hide_title
field. -
#icon ⇒ type: URI
The
icon
field. -
#icon_file_name ⇒ type: String
The
icon_file_name
field. -
#included_places ⇒ Array<item_type: Place>
The
included_places
field. -
#included_taxa ⇒ Array<item_type: Taxon>
The
included_taxa
field. -
#is_umbrella ⇒ type: Boolean
The
is_umbrella
field. -
#location ⇒ type: Location
The
location
field. -
#observation_requirements_updated_at ⇒ type: Time
The
observation_requirements_updated_at
field. -
#observations ⇒ Array<item_type: Observation>
The
observations
field. -
#place ⇒ type: Place
The
place
field. -
#prefers_user_trust ⇒ type: Boolean
The
prefers_user_trust
field. -
#project_observation_rules ⇒ Array<item_type: ProjectObservationRule>
The
project_observation_rules
field. -
#project_type ⇒ type: ProjectType
The
project_type
field. -
#slug ⇒ type: Symbol
The
slug
field. -
#subprojects ⇒ Array<item_type: Project>
The
subprojects
field. -
#title ⇒ type: String
The
title
field. -
#updated_at ⇒ type: Time
The
updated_at
field. -
#user ⇒ type: User
The
user
field.
Attributes inherited from Data::Entity
Instance Method Summary collapse
Methods included from BySLUG
Methods included from Data::Types
#radius, radius, #sector, sector
Methods inherited from Data::Entity
by_id, #complete?, ddl, fetch, from_db_rows, #get, #init, #initialize, load, load_file, parse, read, #save, #to_db, #update
Methods included from App::Logger::DSL
#debug, debug, echo, #echo, error, #error, #info, info, log, #log, #warning, warning
Methods inherited from Data::Model
DDL, api_limit, api_part, api_path, backs, block, field, fields, has_path?, has_table?, #ignore, #initialize, links, #post_update, #process?, #saved?, table, #to_h, #update
Constructor Details
This class inherits a constructor from INat::Data::Entity
Instance Attribute Details
#admins ⇒ Array<item_type: ProjectAdmin>
Returns the admins
field.
60 |
# File 'lib/inat/data/entity/project.rb', line 60 backs :admins, item_type: ProjectAdmin, owned: true |
#banner_color ⇒ type: String
TODO: сделать тип
48 |
# File 'lib/inat/data/entity/project.rb', line 48 field :banner_color, type: String |
#created_at ⇒ type: Time
Returns the created_at
field.
39 |
# File 'lib/inat/data/entity/project.rb', line 39 field :created_at, type: Time |
#description ⇒ type: String
Returns the description
field.
36 |
# File 'lib/inat/data/entity/project.rb', line 36 field :description, type: String |
#excluded_places ⇒ Array<item_type: Place>
Returns the excluded_places
field.
70 |
# File 'lib/inat/data/entity/project.rb', line 70 links :excluded_places, item_type: Place, ids_field: :excluded_places_ids, table_name: :project_rule_excluded_places, owned: false |
#excluded_taxa ⇒ Array<item_type: Taxon>
Returns the excluded_taxa
field.
68 |
# File 'lib/inat/data/entity/project.rb', line 68 links :excluded_taxa, item_type: Taxon, ids_field: :excluded_taxon_ids, table_name: :project_rule_excluded_taxa, owned: false |
#flags ⇒ Array<item_type: Flag>
Returns the flags
field.
63 |
# File 'lib/inat/data/entity/project.rb', line 63 links :flags, item_type: Flag, index: true |
#header_image_contain ⇒ type: Boolean
Returns the header_image_contain
field.
47 |
# File 'lib/inat/data/entity/project.rb', line 47 field :header_image_contain, type: Boolean |
#header_image_file_name ⇒ type: String
Returns the header_image_file_name
field.
46 |
# File 'lib/inat/data/entity/project.rb', line 46 field :header_image_file_name, type: String |
#header_image_url ⇒ type: URI
Returns the header_image_url
field.
45 |
# File 'lib/inat/data/entity/project.rb', line 45 field :header_image_url, type: URI |
#hide_title ⇒ type: Boolean
Returns the hide_title
field.
49 |
# File 'lib/inat/data/entity/project.rb', line 49 field :hide_title, type: Boolean |
#icon ⇒ type: URI
Returns the icon
field.
43 |
# File 'lib/inat/data/entity/project.rb', line 43 field :icon, type: URI |
#icon_file_name ⇒ type: String
Returns the icon_file_name
field.
44 |
# File 'lib/inat/data/entity/project.rb', line 44 field :icon_file_name, type: String |
#included_places ⇒ Array<item_type: Place>
Returns the included_places
field.
69 |
# File 'lib/inat/data/entity/project.rb', line 69 links :included_places, item_type: Place, ids_field: :included_place_ids, table_name: :project_rule_places, owned: false |
#included_taxa ⇒ Array<item_type: Taxon>
Returns the included_taxa
field.
67 |
# File 'lib/inat/data/entity/project.rb', line 67 links :included_taxa, item_type: Taxon, ids_field: :included_taxon_ids, table_name: :project_rule_taxa, owned: false |
#is_umbrella ⇒ type: Boolean
Returns the is_umbrella
field.
38 |
# File 'lib/inat/data/entity/project.rb', line 38 field :is_umbrella, type: Boolean, index: true |
#location ⇒ type: Location
Returns the location
field.
51 |
# File 'lib/inat/data/entity/project.rb', line 51 field :location, type: Location |
#observation_requirements_updated_at ⇒ type: Time
Returns the observation_requirements_updated_at
field.
41 |
# File 'lib/inat/data/entity/project.rb', line 41 field :observation_requirements_updated_at, type: Time |
#observations ⇒ Array<item_type: Observation>
Returns the observations
field.
72 |
# File 'lib/inat/data/entity/project.rb', line 72 links :observations, item_type: Observation, table_name: :project_observations, owned: false |
#place ⇒ type: Place
Returns the place
field.
53 |
# File 'lib/inat/data/entity/project.rb', line 53 field :place, type: Place, index: true |
#prefers_user_trust ⇒ type: Boolean
Returns the prefers_user_trust
field.
42 |
# File 'lib/inat/data/entity/project.rb', line 42 field :prefers_user_trust, type: Boolean |
#project_observation_rules ⇒ Array<item_type: ProjectObservationRule>
Returns the project_observation_rules
field.
61 |
# File 'lib/inat/data/entity/project.rb', line 61 backs :project_observation_rules, item_type: ProjectObservationRule, owned: true |
#project_type ⇒ type: ProjectType
Returns the project_type
field.
37 |
# File 'lib/inat/data/entity/project.rb', line 37 field :project_type, type: ProjectType, index: true |
#slug ⇒ type: Symbol
Returns the slug
field.
34 |
# File 'lib/inat/data/entity/project.rb', line 34 field :slug, type: Symbol, index: true |
#subprojects ⇒ Array<item_type: Project>
Returns the subprojects
field.
65 |
# File 'lib/inat/data/entity/project.rb', line 65 links :subprojects, item_type: Project, table_name: :project_children, link_field: :child_id, owned: false |
#title ⇒ type: String
Returns the title
field.
35 |
# File 'lib/inat/data/entity/project.rb', line 35 field :title, type: String, index: true, required: true |
Instance Method Details
#to_s ⇒ Object
96 97 98 |
# File 'lib/inat/data/entity/project.rb', line 96 def to_s "<a href=\"https://www.inaturalist.org/projects/#{ id }\"><i class=\"fa fa-briefcase\"></i> #{ title }</a>" end |