Class: Bijou::Parse::Def

Inherits:
Target
  • Object
show all
Defined in:
lib/bijou/backend.rb

Direct Known Subclasses

Method

Instance Attribute Summary collapse

Attributes inherited from Target

#args

Instance Method Summary collapse

Methods inherited from Target

#render_args, #render_code, #render_code_, #render_expr, #render_line, #render_marker, #render_part

Constructor Details

#initialize(name) ⇒ Def

Returns a new instance of Def.



120
121
122
123
# File 'lib/bijou/backend.rb', line 120

def initialize(name)
  super()
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



125
126
127
# File 'lib/bijou/backend.rb', line 125

def name
  @name
end

Instance Method Details

#renderMethodObject



127
128
129
130
131
132
133
134
135
# File 'lib/bijou/backend.rb', line 127

def renderMethod
  result = ''

  result << "  def #{@name}\n"
  result << @output
  result << "  end\n"

  return result
end