Class: Chunk
- Inherits:
-
Object
- Object
- Chunk
- Defined in:
- app/models/chunk.rb
Overview
Motiro - A project tracking tool
Copyright (C) 2006-2008 Thiago Arrais
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
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.
20 21 22 |
# File 'app/models/chunk.rb', line 20 def initialize(action) @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
18 19 20 |
# File 'app/models/chunk.rb', line 18 def action @action end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
18 19 20 |
# File 'app/models/chunk.rb', line 18 def lines @lines end |
Instance Method Details
#<<(line) ⇒ Object
30 31 32 33 |
# File 'app/models/chunk.rb', line 30 def <<(line) @lines ||= [] @lines << line end |
#separator? ⇒ Boolean
28 |
# File 'app/models/chunk.rb', line 28 def separator?; false; end |
#unchanged? ⇒ Boolean
24 25 26 |
# File 'app/models/chunk.rb', line 24 def unchanged? :unchanged == action end |