300件ヒット
[1-100件を表示]
(0.037秒)
別のキーワード
ライブラリ
- ビルトイン (48)
- erb (36)
- forwardable (24)
- json (120)
-
net
/ http (24) - openssl (12)
-
rdoc
/ context (24) - win32ole (12)
クラス
- ERB (36)
- Method (12)
-
Net
:: HTTPGenericRequest (12) -
OpenSSL
:: SSL :: SSLContext (12) -
RDoc
:: Context (24) -
RubyVM
:: InstructionSequence (24) - UnboundMethod (12)
-
WIN32OLE
_ TYPE (12)
モジュール
- Forwardable (24)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (24) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
Net
:: HTTPHeader (12)
キーワード
-
add
_ to (12) -
client
_ cert _ cb= (12) -
def
_ class (12) -
def
_ delegator (12) -
def
_ instance _ delegator (12) -
def
_ method (12) -
def
_ module (12) -
default
_ event _ sources (12) -
first
_ lineno (12) -
initialize
_ methods _ etc (12) -
source
_ location (24) -
to
_ a (12) -
to
_ json (108) -
to
_ json _ raw _ object (12)
検索結果
先頭5件
-
Net
:: HTTPGenericRequest # method -> String (18120.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
Net
:: HTTPHeader # method -> String (18114.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
Method
# source _ location -> [String , Integer] | nil (9025.0) -
ソースコードのファイル名と行番号を配列で返します。
...@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]
method(:puts).source_location # => nil
//}... -
ERB
# def _ method(mod , methodname , fname=& # 39;(ERB)& # 39;) -> nil (6214.0) -
変換した Ruby スクリプトをメソッドとして定義します。
...指定し、メソッド名は methodname で指定します。
fname はスクリプトを定義する際のファイル名です。主にエラー時に活躍します。
@param mod メソッドを定義するモジュール(またはクラス)
@param methodname メソッド名
@param fname......スクリプトを定義する際のファイル名
例:
require 'erb'
erb = ERB.new(script)
erb.def_method(MyClass, 'foo(bar)', 'foo.erb')... -
RDoc
:: Context # initialize _ methods _ etc -> () (6117.0) -
追加されたメソッド、属性、alias されたメソッド(メソッド名の対応が取れて いないものを含む)、require されたファイル、include されたファイル、定数 をクリアします。
...追加されたメソッド、属性、alias されたメソッド(メソッド名の対応が取れて
いないものを含む)、require されたファイル、include されたファイル、定数
をクリアします。... -
UnboundMethod
# source _ location -> [String , Integer] | nil (3025.0) -
ソースコードのファイル名と行番号を配列で返します。
...nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}
@see Proc#source_location, Method#source_location... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (3013.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (3007.0) -
自身から生成した JSON 形式の文字列を返します。
...N 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//}... -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (3007.0) -
自身から生成した JSON 形式の文字列を返します。
...JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//}...