Class: Rafflesia::QuerySource
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::QuerySource
- Defined in:
- lib/rafflesia/database_join_requirements/query_source.rb
Constant Summary collapse
- HASH_ATTRS =
{ database: :database, name: :name, relation: :relation, release: :release }.freeze
Instance Attribute Summary collapse
-
#database ⇒ Object
Returns the value of attribute database.
-
#name ⇒ Object
Returns the value of attribute name.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#release ⇒ Object
Returns the value of attribute release.
Instance Method Summary collapse
-
#initialize(json) ⇒ QuerySource
constructor
A new instance of QuerySource.
Constructor Details
#initialize(json) ⇒ QuerySource
Returns a new instance of QuerySource.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/database_join_requirements/query_source.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @database = hash[:database] @name = hash[:name] @relation = hash[:relation] @release = hash[:release] end |
Instance Attribute Details
#database ⇒ Object
Returns the value of attribute database.
15 16 17 |
# File 'lib/rafflesia/database_join_requirements/query_source.rb', line 15 def database @database end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/rafflesia/database_join_requirements/query_source.rb', line 15 def name @name end |
#relation ⇒ Object
Returns the value of attribute relation.
15 16 17 |
# File 'lib/rafflesia/database_join_requirements/query_source.rb', line 15 def relation @relation end |
#release ⇒ Object
Returns the value of attribute release.
15 16 17 |
# File 'lib/rafflesia/database_join_requirements/query_source.rb', line 15 def release @release end |