Class: ActiveRecord::Relation::FromClause
- Inherits:
-
Object
- Object
- ActiveRecord::Relation::FromClause
- Defined in:
- lib/active_record/relation/from_clause.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(value, name) ⇒ FromClause
constructor
A new instance of FromClause.
- #merge(other) ⇒ Object
Constructor Details
#initialize(value, name) ⇒ FromClause
Returns a new instance of FromClause.
8 9 10 11 |
# File 'lib/active_record/relation/from_clause.rb', line 8 def initialize(value, name) @value = value @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/active_record/relation/from_clause.rb', line 6 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/active_record/relation/from_clause.rb', line 6 def value @value end |
Class Method Details
.empty ⇒ Object
21 22 23 |
# File 'lib/active_record/relation/from_clause.rb', line 21 def self.empty @empty ||= new(nil, nil) end |
Instance Method Details
#empty? ⇒ Boolean
17 18 19 |
# File 'lib/active_record/relation/from_clause.rb', line 17 def empty? value.nil? end |
#merge(other) ⇒ Object
13 14 15 |
# File 'lib/active_record/relation/from_clause.rb', line 13 def merge(other) self end |