Class: SQLSearch::Atoms::Column
- Inherits:
-
Object
- Object
- SQLSearch::Atoms::Column
- Defined in:
- lib/sql_search_parser.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#space ⇒ Object
readonly
Returns the value of attribute space.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(options) ⇒ Column
constructor
A new instance of Column.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ Column
Returns a new instance of Column.
118 119 120 121 122 |
# File 'lib/sql_search_parser.rb', line 118 def initialize @name = [:name] @table = [:table] @space = [:space] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
116 117 118 |
# File 'lib/sql_search_parser.rb', line 116 def name @name end |
#space ⇒ Object (readonly)
Returns the value of attribute space.
116 117 118 |
# File 'lib/sql_search_parser.rb', line 116 def space @space end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
116 117 118 |
# File 'lib/sql_search_parser.rb', line 116 def table @table end |
Instance Method Details
#to_s ⇒ Object
124 125 126 |
# File 'lib/sql_search_parser.rb', line 124 def to_s [space,table,name].compact.map { |a| "`#{a}`" }.join('.') end |