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, #identifiers, #identifiers_analysis, #normalization_options, #transformed_asts, #transformed_asts_analysis

Constructor Details

#initialize(language_name) ⇒ Native

Returns a new instance of Native.



49
50
51
# File 'lib/mulang/language.rb', line 49

def initialize(language_name)
  @name = language_name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



47
48
49
# File 'lib/mulang/language.rb', line 47

def name
  @name
end

Instance Method Details

#sample(content) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/mulang/language.rb', line 53

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