class TFClient::Models::ModelWithItems
Attributes
items[R]
Public Instance Methods
count()
click to toggle source
# File lib/textflight-client/models/model.rb, line 34 def count @items.count end
items_to_s()
click to toggle source
# File lib/textflight-client/models/model.rb, line 42 def items_to_s @items.map { |item| "\t#{item[:string]}" } end
lines_offset()
click to toggle source
# File lib/textflight-client/models/model.rb, line 50 def lines_offset @items.length + 1 end
response_str()
click to toggle source
# File lib/textflight-client/models/model.rb, line 46 def response_str "#{@translation}:\n#{items_to_s.join("\n")}" end
to_s()
click to toggle source
# File lib/textflight-client/models/model.rb, line 38 def to_s "#{@translation}: #{@items.map { |item| item[:string]}}" end