Class: Relyze::FileModel::Information
- Inherits:
-
Object
- Object
- Relyze::FileModel::Information
- Defined in:
- C:/Program Files/Relyze/lib/relyze/core/file_model.rb
Overview
The information class describes a line of information as displayed in the Overview of a model in the GUI.
Instance Attribute Summary collapse
-
#data ⇒ Object
A String for this information data.
-
#group ⇒ Object
A Symbol for group this Information belongs to, either :file, :hash, :format, :security, :analysis, :general or :plugin.
-
#offset ⇒ Object
If the view is either :overview, :structure or :code, then the offset describes the file offset to go to.
-
#title ⇒ Object
A String for the title of this information.
-
#url ⇒ Object
If the view is :internet, then the URL describes the location to visit in the users browser.
-
#view ⇒ Object
A Symbol for the view that will be changed to if this information is double clicked in the GUI, either :overview, :structure, :code or :internet.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Information
constructor
A new instance of Information.
-
#to_s ⇒ String
Returns this information #data.
Constructor Details
#initialize(params = {}) ⇒ Information
Returns a new instance of Information
58 59 60 61 62 63 64 65 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 58 def initialize( params={} ) @group = params[:group] || :general @title = params[:title] || '' @data = params[:data] || '' @view = params[:view] || :unknown @offset = params[:offset] || -1 @url = params[:url] || '' end |
Instance Attribute Details
#data ⇒ Object
A String for this information data.
40 41 42 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 40 def data @data end |
#group ⇒ Object
A Symbol for group this Information belongs to, either :file, :hash, :format, :security, :analysis, :general or :plugin
34 35 36 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 34 def group @group end |
#offset ⇒ Object
If the view is either :overview, :structure or :code, then the offset describes the file offset to go to.
46 47 48 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 46 def offset @offset end |
#title ⇒ Object
A String for the title of this information.
37 38 39 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 37 def title @title end |
#url ⇒ Object
If the view is :internet, then the URL describes the location to visit in the users browser.
49 50 51 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 49 def url @url end |
#view ⇒ Object
A Symbol for the view that will be changed to if this information is double clicked in the GUI, either :overview, :structure, :code or :internet.
43 44 45 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 43 def view @view end |
Instance Method Details
#to_s ⇒ String
Returns this information #data.
68 69 70 |
# File 'C:/Program Files/Relyze/lib/relyze/core/file_model.rb', line 68 def to_s return @data end |