Class: Piggly::Dumper::QualifiedName
- Defined in:
- lib/piggly/dumper/qualified_name.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(schema, name) ⇒ QualifiedName
constructor
A new instance of QualifiedName.
- #quote ⇒ String
- #to_s ⇒ String
Constructor Details
#initialize(schema, name) ⇒ QualifiedName
Returns a new instance of QualifiedName.
7 8 9 |
# File 'lib/piggly/dumper/qualified_name.rb', line 7 def initialize(schema, name) @schema, @name = schema, name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/piggly/dumper/qualified_name.rb', line 5 def name @name end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
5 6 7 |
# File 'lib/piggly/dumper/qualified_name.rb', line 5 def schema @schema end |
Instance Method Details
#==(other) ⇒ Boolean
30 31 32 |
# File 'lib/piggly/dumper/qualified_name.rb', line 30 def ==(other) self.to_s == other.to_s end |
#quote ⇒ String
12 13 14 15 16 17 18 |
# File 'lib/piggly/dumper/qualified_name.rb', line 12 def quote if @schema '"' + @schema + '"."' + @name + '"' else '"' + @name + '"' end end |
#to_s ⇒ String
21 22 23 24 25 26 27 |
# File 'lib/piggly/dumper/qualified_name.rb', line 21 def to_s if @schema @schema + "." + @name else @name end end |