Class: Lucid::AST::Table::Cell
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#status ⇒ Object
Returns the value of attribute status.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #accept(visitor) ⇒ Object
- #eql?(o) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(value, table, line) ⇒ Cell
constructor
A new instance of Cell.
- #inspect! ⇒ Object
-
#to_sexp ⇒ Object
For testing only.
Constructor Details
#initialize(value, table, line) ⇒ Cell
Returns a new instance of Cell.
685 686 687 |
# File 'lib/lucid/ast/table.rb', line 685 def initialize(value, table, line) @value, @table, @line = value, table, line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
682 683 684 |
# File 'lib/lucid/ast/table.rb', line 682 def line @line end |
#status ⇒ Object
Returns the value of attribute status.
683 684 685 |
# File 'lib/lucid/ast/table.rb', line 683 def status @status end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
682 683 684 |
# File 'lib/lucid/ast/table.rb', line 682 def table @table end |
#value ⇒ Object
Returns the value of attribute value.
683 684 685 |
# File 'lib/lucid/ast/table.rb', line 683 def value @value end |
Instance Method Details
#==(o) ⇒ Object
699 700 701 |
# File 'lib/lucid/ast/table.rb', line 699 def ==(o) SurplusCell === o || value == o.value end |
#accept(visitor) ⇒ Object
689 690 691 692 693 |
# File 'lib/lucid/ast/table.rb', line 689 def accept(visitor) visitor.visit_table_cell(self) do visitor.visit_table_cell_value(value, status) end end |
#eql?(o) ⇒ Boolean
703 704 705 |
# File 'lib/lucid/ast/table.rb', line 703 def eql?(o) self == o end |
#hash ⇒ Object
707 708 709 |
# File 'lib/lucid/ast/table.rb', line 707 def hash 0 end |
#inspect! ⇒ Object
695 696 697 |
# File 'lib/lucid/ast/table.rb', line 695 def inspect! @value = "(i) #{value.inspect}" end |
#to_sexp ⇒ Object
For testing only
712 713 714 |
# File 'lib/lucid/ast/table.rb', line 712 def to_sexp #:nodoc: [:cell, @value] end |