Class: Chunk
- Inherits:
-
Object
- Object
- Chunk
- Defined in:
- app/models/chunk.rb
Overview
Motiro - A project tracking tool
Copyright (C) 2006-2007 Thiago Arrais
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Instance Method Summary collapse
- #<<(line) ⇒ Object
-
#initialize(action) ⇒ Chunk
constructor
A new instance of Chunk.
- #separator? ⇒ Boolean
- #unchanged? ⇒ Boolean
Constructor Details
#initialize(action) ⇒ Chunk
Returns a new instance of Chunk.
21 22 23 |
# File 'app/models/chunk.rb', line 21 def initialize(action) @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
19 20 21 |
# File 'app/models/chunk.rb', line 19 def action @action end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
19 20 21 |
# File 'app/models/chunk.rb', line 19 def lines @lines end |
Instance Method Details
#<<(line) ⇒ Object
31 32 33 34 |
# File 'app/models/chunk.rb', line 31 def <<(line) @lines ||= [] @lines << line end |
#separator? ⇒ Boolean
29 |
# File 'app/models/chunk.rb', line 29 def separator?; false; end |
#unchanged? ⇒ Boolean
25 26 27 |
# File 'app/models/chunk.rb', line 25 def unchanged? :unchanged == action end |