Class: Bwoken::Coffeescript::GithubImportString

Inherits:
ImportString
  • Object
show all
Defined in:
lib/bwoken/coffeescript/github_import_string.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ GithubImportString

Returns a new instance of GithubImportString.



9
10
11
12
# File 'lib/bwoken/coffeescript/github_import_string.rb', line 9

def initialize string
  @string = string
  parse_parts
end

Instance Attribute Details

#file_pathObject (readonly)

Returns the value of attribute file_path.



7
8
9
# File 'lib/bwoken/coffeescript/github_import_string.rb', line 7

def file_path
  @file_path
end

#repo_nameObject (readonly)

Returns the value of attribute repo_name.



7
8
9
# File 'lib/bwoken/coffeescript/github_import_string.rb', line 7

def repo_name
  @repo_name
end

Instance Method Details

#parseObject



14
15
16
# File 'lib/bwoken/coffeescript/github_import_string.rb', line 14

def parse
  ensure_github
end

#to_sObject



18
19
20
# File 'lib/bwoken/coffeescript/github_import_string.rb', line 18

def to_s
  %Q|#import "#{repo_path}/#{file_path}"|
end