Class: Huebot::Program::Src

Inherits:
Struct
  • Object
show all
Defined in:
lib/huebot/program.rb

Overview

Struct for storing a program’s Intermediate Representation and source filepath.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_versionFloat

API version

Returns:

  • (Float)

    the current value of api_version



10
11
12
# File 'lib/huebot/program.rb', line 10

def api_version
  @api_version
end

#filepathString

Returns the current value of filepath.

Returns:

  • (String)

    the current value of filepath



10
11
12
# File 'lib/huebot/program.rb', line 10

def filepath
  @filepath
end

#tokensHash

Returns the current value of tokens.

Returns:

  • (Hash)

    the current value of tokens



10
11
12
# File 'lib/huebot/program.rb', line 10

def tokens
  @tokens
end

Instance Method Details

#default_nameObject



11
12
13
# File 'lib/huebot/program.rb', line 11

def default_name
  File.basename(filepath, ".*")
end