Class: LogsTF::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/logs_tf/log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, map_name = "", title = "", api_key = LogsTF::API_KEY) ⇒ Log

Returns a new instance of Log.



7
8
9
10
11
12
# File 'lib/logs_tf/log.rb', line 7

def initialize(file, map_name = "", title = "", api_key = LogsTF::API_KEY)
  @file     = file
  @map_name = map_name
  @title    = title
  @api_key  = api_key
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/logs_tf/log.rb', line 5

def api_key
  @api_key
end

#fileObject

Returns the value of attribute file.



5
6
7
# File 'lib/logs_tf/log.rb', line 5

def file
  @file
end

#map_nameObject

Returns the value of attribute map_name.



5
6
7
# File 'lib/logs_tf/log.rb', line 5

def map_name
  @map_name
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/logs_tf/log.rb', line 5

def title
  @title
end

Instance Method Details

#filenameObject



14
15
16
# File 'lib/logs_tf/log.rb', line 14

def filename
  File.basename(file)
end