Class: Packcr::Parser::LrAnswer
- Inherits:
-
Object
- Object
- Packcr::Parser::LrAnswer
- Defined in:
- lib/packcr/parser.rb
Instance Attribute Summary collapse
-
#chunk ⇒ Object
Returns the value of attribute chunk.
-
#hold ⇒ Object
Returns the value of attribute hold.
-
#lr ⇒ Object
Returns the value of attribute lr.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#pos_loc ⇒ Object
Returns the value of attribute pos_loc.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, pos, pos_loc) ⇒ LrAnswer
constructor
A new instance of LrAnswer.
- #set_chunk(chunk) ⇒ Object
Constructor Details
#initialize(type, pos, pos_loc) ⇒ LrAnswer
Returns a new instance of LrAnswer.
4255 4256 4257 4258 4259 |
# File 'lib/packcr/parser.rb', line 4255 def initialize(type, pos, pos_loc) @type = type @pos = pos @pos_loc = pos_loc end |
Instance Attribute Details
#chunk ⇒ Object
Returns the value of attribute chunk.
4252 4253 4254 |
# File 'lib/packcr/parser.rb', line 4252 def chunk @chunk end |
#hold ⇒ Object
Returns the value of attribute hold.
4252 4253 4254 |
# File 'lib/packcr/parser.rb', line 4252 def hold @hold end |
#lr ⇒ Object
Returns the value of attribute lr.
4252 4253 4254 |
# File 'lib/packcr/parser.rb', line 4252 def lr @lr end |
#pos ⇒ Object
Returns the value of attribute pos.
4252 4253 4254 |
# File 'lib/packcr/parser.rb', line 4252 def pos @pos end |
#pos_loc ⇒ Object
Returns the value of attribute pos_loc.
4253 4254 4255 |
# File 'lib/packcr/parser.rb', line 4253 def pos_loc @pos_loc end |
#type ⇒ Object
Returns the value of attribute type.
4252 4253 4254 |
# File 'lib/packcr/parser.rb', line 4252 def type @type end |
Instance Method Details
#set_chunk(chunk) ⇒ Object
4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 |
# File 'lib/packcr/parser.rb', line 4261 def set_chunk(chunk) a = LrAnswer.new(@type, @pos, @pos_loc) if @type == :lr a.lr = @lr elsif @type == :chunk a.chunk = @chunk end a.hold = @hold @hold = a @type = :chunk @chunk = chunk end |