代码搜索:methods

找到约 10,000 项符合「methods」的源代码

代码结果 10,000
www.eeworm.com/read/275831/10794224

rb 04 - overloading methods.rb

# The Rectangle constructor accepts arguments in either of the following forms: # Rectangle.new([x_top, y_left], length, width) # Rectangle.new([x_top, y_left], [x_bottom, y_right]) class Rectangle
www.eeworm.com/read/275831/10794415

rb 13 - aliasing methods.rb

class InventoryItem attr_accessor :name, :unit_price def initialize(name, unit_price) @name, @unit_price = name, unit_price end def price(quantity=1) @unit_price * quantity end