Class: Grammar::Ruby::Code::Dot
- Inherits:
-
Unary
- Object
- Grammar::Ruby::Code
- Unary
- Grammar::Ruby::Code::Dot
- Defined in:
- lib/grammar/ruby/code.rb
Constant Summary
Constants inherited from Grammar::Ruby::Code
False, FalseTerminator, Implicit, Nil, Self, True
Instance Method Summary collapse
- #_data ⇒ Object
- #_lines(text, indent = 0, op = nil, maxlen = 72) ⇒ Object
- #_operator ⇒ Object
-
#initialize(receiver, method) ⇒ Dot
constructor
A new instance of Dot.
Methods inherited from Unary
Methods inherited from Grammar::Ruby::Code
[], #_always, #_and, #_assign, #_classname, #_code_self, #_codes, #_def, #_dot, #_else, #_ensure, #_equal, #_immediate, #_inspect, #_locals, #_mid, #_never, #_not, #_or, #_question, #_rand, #_rcond, #_rescue, #_ror, #_rstep, #_splat, #_step, #_to_block, #_unless, #_until, #_while, #method_missing
Constructor Details
#initialize(receiver, method) ⇒ Dot
Returns a new instance of Dot.
417 418 419 420 |
# File 'lib/grammar/ruby/code.rb', line 417 def initialize(receiver, method) @operand = receiver @method = method end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Grammar::Ruby::Code
Instance Method Details
#_data ⇒ Object
421 422 423 |
# File 'lib/grammar/ruby/code.rb', line 421 def _data @method end |
#_lines(text, indent = 0, op = nil, maxlen = 72) ⇒ Object
427 428 429 430 431 |
# File 'lib/grammar/ruby/code.rb', line 427 def _lines(text, indent=0, op=nil, maxlen=72) @operand._lines(text, indent, op, maxlen) ensure (text.last << ?\.).concat(@method) end |
#_operator ⇒ Object
424 425 426 |
# File 'lib/grammar/ruby/code.rb', line 424 def _operator @method end |