るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.038秒)

別のキーワード

  1. specification attributes
  2. specification array_attribute
  3. specification attribute_names
  4. specification validate

検索結果

Gem::Specification.attribute(name) -> () (63304.0)

デフォルト値を指定したアクセサを定義するために使用します。

デフォルト値を指定したアクセサを定義するために使用します。

以下の副作用があります。

* クラス変数 @@attributes, @@default_value を変更します。
* 通常の属性書き込みメソッドを定義します。
* デフォルト値を持つ属性読み取りメソッドのように振る舞うメソッドを定義します。

Gem::Specification.array_attribute(name) -> () (27436.0)

Gem::Specification.attribute と同じですが、値を配列に格納するアクセサを作ります。

Gem::Specification.attribute と同じですが、値を配列に格納するアクセサを作ります。

@param name 属性の名前を指定します。

@see Gem::Specification.attribute

Gem::Specification.required_attribute(name, default = nil) -> () (27340.0)

必須の属性を作成します。

必須の属性を作成します。

@param name 属性名を指定します。

@param default デフォルト値を指定します。

@see Gem::Specification.attribute

Gem::Specification.attribute_alias_singular(singular, plural) -> () (27322.0)

既に存在する複数形の属性の単数形バージョンを定義します。

既に存在する複数形の属性の単数形バージョンを定義します。

これは単に一つの引数を受け取りそれを配列に追加するようなヘルパーメソッドを定義するということです。

例:

# このように定義すると
attribute_alias_singular :require_path, :require_paths
# こう書くかわりに
s.require_paths = ['mylib']
# こう書くことができます。
s.require_path = 'mylib'

@param singular 属性名の単数形を指定します。

@param plural 属性名の複数形を...

Gem::Specification.attribute_defaults -> Array (27304.0)

@todo

@todo

@@attributes の複製を返します。

絞り込み条件を変える

Gem::Specification.attribute_names -> Array (27304.0)

属性名の配列を返します。

属性名の配列を返します。

Gem::Specification.required_attribute?(name) -> bool (27304.0)

必須属性であれば真を返します。

必須属性であれば真を返します。

@param name 属性名を指定します。

Gem::Specification.array_attributes -> Array (27301.0)

@@array_attributes の複製を返します。

@@array_attributes の複製を返します。

@see Object#dup

Gem::Specification.attributes(*args) -> () (27301.0)

複数の属性を一度に作成するために使用します。

複数の属性を一度に作成するために使用します。

各属性のデフォルト値は nil になります。

@param args 属性名を一つ以上指定します。

Gem::Specification.required_attributes -> Array (27301.0)

必須属性のリストを返します。

必須属性のリストを返します。

絞り込み条件を変える

net/http (55.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

汎用データ転送プロトコル HTTP を扱うライブラリです。
実装は 2616 に基きます。

=== 使用例

==== ウェブサーバからドキュメントを得る (GET)

//emlist[例1: GET して 表示するだけ][ruby]{
require 'net/http'
print Net::HTTP.get('www.example.com', '/index.html')
//}

//emlist[例2: URI を使う][ruby]{
require 'net/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://w...