Class: YqlQuery::Source
- Inherits:
-
Object
- Object
- YqlQuery::Source
- Defined in:
- lib/yql_query/source.rb
Overview
A class used by Builder to store additional data sources.
Instance Attribute Summary collapse
-
#as ⇒ Object
Returns the value of attribute as.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#==(b) ⇒ Object
Sources are equal if both their ‘source’ and ‘as’ attributes are equivalent.
-
#initialize(source, as) ⇒ Source
constructor
A new instance of Source.
Constructor Details
#initialize(source, as) ⇒ Source
Returns a new instance of Source.
7 8 9 10 |
# File 'lib/yql_query/source.rb', line 7 def initialize(source, as) @source = source @as = as end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
5 6 7 |
# File 'lib/yql_query/source.rb', line 5 def as @as end |
#source ⇒ Object
Returns the value of attribute source.
5 6 7 |
# File 'lib/yql_query/source.rb', line 5 def source @source end |
Instance Method Details
#==(b) ⇒ Object
Sources are equal if both their ‘source’ and ‘as’ attributes are equivalent.
13 14 15 |
# File 'lib/yql_query/source.rb', line 13 def ==(b) self.source == b.source && self.as == b.as end |