Class: TokyoMetro::Document::MakeExamples::Static::EachFile::EachMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/tokyo_metro/document/make_examples/static/each_file/each_method.rb

Instance Method Summary collapse

Constructor Details

#initialize(indent, title, h, value_in_block, displayed) ⇒ EachMethod

Returns a new instance of EachMethod.



3
4
5
6
7
8
9
# File 'lib/tokyo_metro/document/make_examples/static/each_file/each_method.rb', line 3

def initialize ( indent , title , h , value_in_block , displayed )
  @indent = indent
  @title = title
  @hash_const = h.gsub( /\Ahash \: / , "" )
  @value_in_block = value_in_block.gsub( /\Avalue in block \: / , "" )
  @displayed = displayed.gsub( /\Adisplayed \: / , "" )
end

Instance Method Details

#to_sObject



11
12
13
14
15
16
17
18
# File 'lib/tokyo_metro/document/make_examples/static/each_file/each_method.rb', line 11

def to_s
  puts ""
  puts @title
  # puts ""
  # puts code_for_making_example

  [ top , results ].join( "\n" )
end