class TokyoMetro::Api::MetaClass::Fundamental::List
API から提供されるデータを格納する配列(メタクラス)
Public Instance Methods
find_by_same_as( search_by )
click to toggle source
# File lib/tokyo_metro/api/meta_class/fundamental/list.rb, line 14 def find_by_same_as( search_by ) self.find { | item | search_by === item.same_as } end
to_strf( indent = 0 , empty_line = 2 )
click to toggle source
インスタンスの情報を整形した文字列にして返すメソッド @param indent [Integer (>=0)] インデントの幅 @param empty_line [Integer (>=0)] 間に入れる空行の数 @return [String]
# File lib/tokyo_metro/api/meta_class/fundamental/list.rb, line 10 def to_strf( indent = 0 , empty_line = 2 ) self.map { |i| i.to_strf( indent ) }.join( "\n" * ( empty_line + 1 ) ) end