Class: Nunchaku::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/nunchaku/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Message

Returns a new instance of Message.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/nunchaku/message.rb', line 7

def initialize(data)
  @type           = data['type']
  @subtype        = data['subType']
  @first_line     = data['firstLine']
  @last_line      = data['lastLine']
  @first_column   = data['firstColumn']
  @last_column    = data['lastColumn']
  @message        = data['message']
  @extract        = data['extract']
  @hilite_start   = data['hiliteStart']
  @hilite_length  = data['hiliteLength']
end

Instance Attribute Details

#extractObject (readonly)

Returns the value of attribute extract.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def extract
  @extract
end

#first_columnObject (readonly)

Returns the value of attribute first_column.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def first_column
  @first_column
end

#first_lineObject (readonly)

Returns the value of attribute first_line.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def first_line
  @first_line
end

#hilite_lengthObject (readonly)

Returns the value of attribute hilite_length.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def hilite_length
  @hilite_length
end

#hilite_startObject (readonly)

Returns the value of attribute hilite_start.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def hilite_start
  @hilite_start
end

#last_columnObject (readonly)

Returns the value of attribute last_column.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def last_column
  @last_column
end

#last_lineObject (readonly)

Returns the value of attribute last_line.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def last_line
  @last_line
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def message
  @message
end

#subtypeObject (readonly)

Returns the value of attribute subtype.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def subtype
  @subtype
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/nunchaku/message.rb', line 3

def type
  @type
end