Class: Parse::Word

Inherits:
Object show all
Includes:
FromHash
Defined in:
lib/ascension/parse.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

Returns the value of attribute raw.



35
36
37
# File 'lib/ascension/parse.rb', line 35

def raw
  @raw
end

Class Method Details

.parsed(ops) ⇒ Object



36
37
38
# File 'lib/ascension/parse.rb', line 36

def self.parsed(ops)
  new(ops)
end

Instance Method Details

#occured?(side) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
45
46
47
48
# File 'lib/ascension/parse.rb', line 42

def occured?(side)
  if word_blk.arity == 1
    side.events.cond?(&word_blk)
  else
    word_blk[side,nil]
  end
end