Class: Mulang::Language::Native

Inherits:
Base
  • Object
show all
Defined in:
lib/mulang/language.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#ast, #ast_analysis, #build_analysis, #identifiers, #identifiers_analysis, #normalization_options, #transformed_asts, #transformed_asts_analysis

Constructor Details

#initialize(language_name) ⇒ Native

Returns a new instance of Native.



61
62
63
# File 'lib/mulang/language.rb', line 61

def initialize(language_name)
  @name = language_name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



59
60
61
# File 'lib/mulang/language.rb', line 59

def name
  @name
end

Instance Method Details

#core_nameObject



73
74
75
# File 'lib/mulang/language.rb', line 73

def core_name
  @name
end

#sample(content) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/mulang/language.rb', line 65

def sample(content)
  {
    tag: 'CodeSample',
    language: @name,
    content: content
  }
end